cpython/Doc/reference
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
..
compound_stmts.rst evaluate positional defaults before keyword-only defaults (closes #16967) 2013-02-10 09:29:59 -05:00
datamodel.rst Merge with 3.3. 2013-03-28 13:28:55 +01:00
executionmodel.rst Merged revisions 88658 via svnmerge from 2011-02-26 21:34:51 +00:00
expressions.rst Clarify point in name mangling doc. 2013-04-14 10:13:42 +02:00
grammar.rst Merged revisions 65378-65379,65430 via svnmerge from 2008-08-03 09:47:27 +00:00
import.rst #17115,17116: Have modules initialize the __package__ and __loader__ 2013-05-04 13:56:58 -04:00
index.rst Merge from 3.2: remove unneeded "Release" and "Date" markers from index pages. 2012-10-28 11:10:24 -07:00
introduction.rst point IronPython to ironpython.net; thanks to Lazar Pancic from docs@ 2011-12-24 23:13:19 +01:00
lexical_analysis.rst #16127: remove outdated references to narrow builds. Patch by Serhiy Storchaka. 2012-10-05 03:33:31 +03:00
simple_stmts.rst Clarify the import statement semantics, especially for implicit imports in the 'from X import Y' variant 2012-08-02 22:02:35 +10:00
toplevel_components.rst Remove duplication. 2011-10-19 10:58:56 +03:00