[issue39841] "as" variable in except block deletes local variables with same name

2020-03-03 Thread Alan Robertson
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" comes to mind.

[issue39841] "as" variable in except block deletes local variables with same name

2020-03-03 Thread Alan Robertson
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

[issue38780] SysLogHandler crash atexit

2020-01-08 Thread Alan Robertson
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

[issue38780] SysLogHandler crash atexit

2021-01-06 Thread Alan Robertson
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 >

[issue38780] SysLogHandler crash atexit

2021-01-06 Thread Alan Robertson
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