cpython/Lib/ctypes
Brett Cannon 4c14b5de1c #17115,17116: Have modules initialize the __package__ and __loader__
attributes to None.

The long-term goal is for people to be able to rely on these
attributes existing and checking for None to see if they have been
set. Since import itself sets these attributes when a loader does not
the only instances when the attributes are None are from someone
overloading __import__() and not using a loader or someone creating a
module from scratch.

This patch also unifies module initialization. Before you could have
different attributes with default values depending on how the module
object was created. Now the only way to not get the same default set
of attributes is to circumvent initialization by calling
ModuleType.__new__() directly.
2013-05-04 13:56:58 -04:00
..
macholib Raise statement normalization in Lib/ctypes/. 2007-08-30 03:47:13 +00:00
test #17115,17116: Have modules initialize the __package__ and __loader__ 2013-05-04 13:56:58 -04:00
__init__.py Issue #17516: use comment syntax for comments, instead of multiline string 2013-03-26 01:11:54 +01:00
_endian.py Issue #12142: Fixed reference cycle when importing ctypes 2012-02-04 20:36:48 -06:00
util.py modernize some modules' code by replacing OSError->ENOENT/ENOTDIR/EPERM/EEXIST occurrences with the corresponding pep-3151 exceptions (FileNotFoundError, NotADirectoryError, etc.) 2013-02-12 15:14:17 +01:00
wintypes.py Issue #3612: Added new types to ctypes.wintypes. (CHAR and pointers) 2010-09-28 21:08:38 +00:00