]> granicus.if.org Git - python/commit
Use ``0'' instead of ``None'' to reset the underlying object in close
authorGuido van Rossum <guido@python.org>
Tue, 4 Nov 1997 17:32:59 +0000 (17:32 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 4 Nov 1997 17:32:59 +0000 (17:32 +0000)
commit19f44560f2387fd0f7e7f6b459510428216b6f79
tree9e8499101ed8e6818c703429952a6fcaa9006753
parent8f3c812e22d1fc2a70c1f1c2b56262553e8d9c34
Use ``0'' instead of ``None'' to reset the underlying object in close
methods.  Using None causes problems if the destructor is called after
the __builtin__ module has already been destroyed (unfortunately, this
can happen!).  I can't just delete the object because it is actually
tested for (if self._sock: ...).  Setting it to 0 is a bit weird but
works.
Lib/plat-win/socket.py