[issue29031] 'from module import *' and __all__

2016-12-21 Thread Eryk Sun
Changes by Eryk Sun : -- nosy: +eryksun resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

[issue29031] 'from module import *' and __all__

2016-12-21 Thread Thomas Heller
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

[issue29031] 'from module import *' and __all__

2016-12-21 Thread eryk sun
eryk sun added the comment: Python 3 does not skip names in __all__ that start with an underscore. wintypes in 2.x uses `from ctypes import *`, so it needs to define __all__. In 3.x it uses `import ctypes`, so it doesn't define __all__, and the private names _COORD, _FILETIME,

[issue29031] 'from module import *' and __all__

2016-12-21 Thread Martin Panter
Martin Panter added the comment: Python 3 doesn’t have an __all__ list; it was removed in r85073 (Issue 3612). I don’t understand why it was removed. Maybe Hirokazu didn’t understand what it does. Since this is a regression, perhaps it should be added back. -- components: +Library

[issue29031] 'from module import *' and __all__

2016-12-21 Thread Thomas Heller
New submission from Thomas Heller: The documentation states that 'from module import *' imports all symbols that are listed in the module's __all__ list. In Python 3, unlike Python 2, only symbols that do NOT start with an underscore are actually imported. The following code works in Python