Alan Robertson added the comment:
As far as I know, this only happens during shutdown. During shutdown it has
already removed the attribute as part of the teardown process. In this case
adding the attribute at the begining will do no good.
On Wed, Jan 6, 2021, at 10:30 AM, Vinay Sajip wrote
Alan Robertson added the comment:
On Wed, Jan 6, 2021, at 10:30 AM, Vinay Sajip wrote:
>
> Vinay Sajip added the comment:
>
> TBH as I said in the now-closed PR, using a NullSocket seems overkill.
> As mentioned in msg359594, it seems to make more sense to assign a
> s
Alan Robertson added the comment:
Thanks for your kind explanation. I may even vaguely remember seeing this
sometime in the past. Thanks much for your time!
--
___
Python tracker
<https://bugs.python.org/issue39
New submission from Alan Robertson :
When an exception "as" variable occurs, it deletes local variables with the
same name. This is certainly surprising, and doesn't appear to be a documented
behavior (but maybe I don't know where to look). The word "bug" come
Alan Robertson added the comment:
There are a variety of different reasons this can fail, not just on MacOS. You
could give it a bad IP address of a server, etc. [That was my particular case].
The constructor should create an attribute 'socket' and initialize it to None
early on.