On Fri, Aug 17, 2001 at 06:23:22PM -0700, Guido van Rossum wrote: > Update of /cvsroot/python/python/dist/src/Lib > In directory usw-pr-cvs1:/tmp/cvs-serv16772 > > Modified Files: > socket.py > Log Message: > When the socket is closed, don't just assign 0 to self._sock. > This breaks software that excepts a socket.error but not an > AttributeError. >... > + class _closedsocket: > + > + def _bummer(self): > + raise error(9, 'Bad file descriptor') > + > + _s = "def %s(self, *args): self._bummer()\n\n" > + for _m in _socketmethods: > + exec _s % _m Isn't this last one easier written has: for _m in _socketmethods: vars()[_m] = _bummer And change _bummer to have a *args. Cheers, -g -- Greg Stein, http://www.lyra.org/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4