396 matching pages, found in 369 ms
Ask StyxWritten on your GPU machine; takes a few seconds the first time.
-
peps.python.orghttps://peps.python.org › pep-0422PEP 422 – Simpler customisation of class creation | peps.python.org
More about peps.python.org
… implicitly converted to a class method when the class is created (prior to the hook being invoked). Note, that when __autodecorate__ is called, the name of the class is not yet bound …
-
peps.python.orghttps://peps.python.org › pep-0557PEP 557 – Data Classes | peps.python.org
More about peps.python.org
… methods as described in the Specification section. Such a class is called a Data Class, but there’s really nothing special about the class: the decorator adds generated methods to the class and …
-
peps.python.orghttps://peps.python.org › pep-3130PEP 3130 – Access to Current Module/Class/Function | peps.python.org
More about peps.python.org
… class__ (or cls, for class methods). Unfortunately, this reference is to the object’s actual class, which may be a subclass of the defining class. The current workaround is to repeat the name …
-
peps.python.orghttps://peps.python.org › pep-0487PEP 487 – Simpler customisation of class creation | peps.python.org
More about peps.python.org
… a deep understanding of the type system and the class construction process. This is legitimately seen as challenging, due to the need to keep multiple moving parts (the code, the metaclass hint …
-
peps.python.orghttps://peps.python.org › pep-0800PEP 800 – Disjoint bases in the type system | peps.python.org
More about peps.python.org
… does not allow a class to inherit from both int and str , so the branch is unreachable. However, the information necessary to determine that these base classes are incompatible is not currently …
-
peps.python.orghttps://peps.python.org › pep-3155PEP 3155 – Qualified name for classes and functions | peps.python.org
More about peps.python.org
… top-level functions and classes, the __qualname__ attribute is equal to the __name__ attribute. For nested classes, methods, and nested functions, the __qualname__ attribute contains a dotted path leading to the object …
-
peps.python.orghttps://peps.python.org › pep-0576PEP 576 – Rationalize Built-in function classes | peps.python.org
More about peps.python.org
… can use one of the pre-existing built-in function or method classes or implement their own custom class in C. The first choice causes them to lose the ability to access …
-
peps.python.orghttps://peps.python.org › pep-0520PEP 520 – Preserving Class Attribute Definition Order | peps.python.org
More about peps.python.org
… changes that by preserving the order in which attributes are introduced in the class definition body. That order will now be preserved in the __definition_order__ attribute of the class. This allows …
-
peps.python.orghttps://peps.python.org › pep-0681PEP 681 – Data Class Transforms | peps.python.org
More about peps.python.org
… is applied to a class, dataclass-like semantics will be assumed for any class that directly or indirectly derives from the decorated class or uses the decorated class as a metaclass. Attributes …
-
peps.python.orghttps://peps.python.org › pep-0544PEP 544 – Protocols: Structural subtyping (static duck typing) | peps.python.org
More about peps.python.org
… difficult to implement. However, the idea of marking an interface class with a special base class is reasonable and easy to implement both statically and at runtime. Python abstract base classes [abstract …
Search for “The Class site:peps.python.org” on Google, or add !ddg, !w and other shortcuts to any search.