[issue29031] 'from module import *' and __all__
Thomas Heller
report at bugs.python.org
Wed Dec 21 10:55:23 EST 2016
Thomas Heller added the comment:
Thanks Martin and eryk for correcting me and finding the real cause of
the problem.
Am 21.12.2016 um 13:04 schrieb eryk sun:
> ... the private names _COORD, _FILETIME, _LARGE_INTEGER,
> _POINTL, _RECTL, _SMALL_RECT, and _ULARGE_INTEGER are skipped by a
> star import. That said, why are these private names (and also "tag"
> names) defined? And why isn't COORD defined instead of or in addition
> to _COORD?
These 'private' names and "tag" names were defined for compatibility
with the windows SDK C header files. I didn't want to apply
the Python 'private' convention to the C names, so they were added to
the __all__ list.
It was an oversight that COORD wasn't defined, I developed a different
solution for the windows SDK names afterwards, but my code (which I'm
porting to Python 3) still uses 'from ctypes.wintypes import *'
and stumbled over the regression just now.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29031>
_______________________________________
More information about the Python-bugs-list
mailing list