This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author eckhardt
Recipients eckhardt, loewis, mhammond
Date 2009-01-11.20:43:33
SpamBayes Score 0.07923737
Marked as misclassified No
Message-id <1231706615.56.0.124096260237.issue4893@psf.upfronthosting.co.za>
In-reply-to
Content
> That's all fine, but why do you need a variable named "e" in
> the first place? Can't you leave the code as it was before?"

There is an intermediate call to a function that retrieves the 
thread's ID. That function may or may not change the output of 
GetLastError(). It probably won't change errno, since it is just 
implemented as a call to the win32 API GetCurrentThreadId(). Still, 
when I have a function that fails and provides additional info through 
errno or GetLastError(), I personally prefer to save that value ASAP 
instead of relying on the fact that some call in between doesn't touch 
it.

I don't really care too much about this piece of code, since it's just 
debug output, but in other cases (like #4906) making such distinction 
is crucial. Since people might read and copy the code, I prefer to 
give them a good example. If you feel differently, just drop me a note 
and I'll change it.
History
Date User Action Args
2009-01-11 20:43:38eckhardtsetrecipients: + eckhardt, loewis, mhammond
2009-01-11 20:43:35eckhardtsetmessageid: <1231706615.56.0.124096260237.issue4893@psf.upfronthosting.co.za>
2009-01-11 20:43:34eckhardtlinkissue4893 messages
2009-01-11 20:43:33eckhardtcreate