projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa32070
)
Inspired by Greg Stein's proposed simplification of the _closesocket
author
Guido van Rossum
<guido@python.org>
Sat, 18 Aug 2001 21:00:39 +0000
(21:00 +0000)
committer
Guido van Rossum
<guido@python.org>
Sat, 18 Aug 2001 21:00:39 +0000
(21:00 +0000)
class, I came up with an even simpler solution: raise the error in
__getattr__().
Lib/socket.py
patch
|
blob
|
history
diff --git
a/Lib/socket.py
b/Lib/socket.py
index ce72b65c6e4c3f788a0df0ba0a5db7bd138b372c..ec8d61092b93892102286c2bc3188f67887cbd73 100644
(file)
--- a/
Lib/socket.py
+++ b/
Lib/socket.py
@@
-155,13
+155,9
@@
class _socketobject:
class _closedsocket:
- def _
bummer(self
):
+ def _
_getattr__(self, name
):
raise error(9, 'Bad file descriptor')
- _s = "def %s(self, *args): self._bummer()\n\n"
- for _m in _socketmethods:
- exec _s % _m
-
class _fileobject: