mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Issue #24254: Drop cls.__definition_order__.
This commit is contained in:
parent
7f730cf01d
commit
4f29e75289
16 changed files with 193 additions and 533 deletions
|
|
@ -25,11 +25,8 @@ CoroutineType = type(_c)
|
|||
_c.close() # Prevent ResourceWarning
|
||||
|
||||
class _C:
|
||||
_nsType = type(locals())
|
||||
def _m(self): pass
|
||||
MethodType = type(_C()._m)
|
||||
# In CPython, this should end up as OrderedDict.
|
||||
_DefaultClassNamespaceType = _C._nsType
|
||||
|
||||
BuiltinFunctionType = type(len)
|
||||
BuiltinMethodType = type([].append) # Same as BuiltinFunctionType
|
||||
|
|
@ -88,7 +85,7 @@ def prepare_class(name, bases=(), kwds=None):
|
|||
if hasattr(meta, '__prepare__'):
|
||||
ns = meta.__prepare__(name, bases, **kwds)
|
||||
else:
|
||||
ns = _DefaultClassNamespaceType()
|
||||
ns = {}
|
||||
return meta, ns, kwds
|
||||
|
||||
def _calculate_meta(meta, bases):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue