[issue4893] Use separate thread support code under MS Windows CE
Ulrich Eckhardt
report at bugs.python.org
Sun Jan 11 21:43:35 CET 2009
Ulrich Eckhardt <eckhardt at satorlaser.com> added the comment:
> 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.
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4893>
_______________________________________
More information about the Python-bugs-list
mailing list