• Brett Cannon's avatar
    #17115,17116: Have modules initialize the __package__ and __loader__ · 4c14b5de
    Brett Cannon yazdı
    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.
    4c14b5de
Adı
Son kayıt (commit)
Son güncelleme
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
Tools Loading commit data...
.bzrignore Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
.hgtouch Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...