395 matching pages, found in 1021 ms

Ask StyxWritten on your GPU machine; takes a few seconds the first time.

  1. peps.python.orghttps://peps.python.org › pep-0422
    More about peps.python.org
    PEP 422 – Simpler customisation of class creation | 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 …

    0 points
  2. peps.python.orghttps://peps.python.org › pep-0557
    More about peps.python.org
    PEP 557 – Data Classes | 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 …

    0 points
  3. peps.python.orghttps://peps.python.org › pep-3130
    More about peps.python.org
    PEP 3130 – Access to Current Module/Class/Function | 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 …

    0 points
  4. peps.python.orghttps://peps.python.org › pep-0487
    More about peps.python.org
    PEP 487 – Simpler customisation of class creation | 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 …

    0 points
  5. peps.python.orghttps://peps.python.org › pep-0800
    More about peps.python.org
    PEP 800 – Disjoint bases in the type system | 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 …

    0 points
  6. peps.python.orghttps://peps.python.org › pep-3155
    More about peps.python.org
    PEP 3155 – Qualified name for classes and functions | 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 …

    0 points
  7. peps.python.orghttps://peps.python.org › pep-0576
    More about peps.python.org
    PEP 576 – Rationalize Built-in function classes | 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 …

    0 points
  8. peps.python.orghttps://peps.python.org › pep-0520
    More about peps.python.org
    PEP 520 – Preserving Class Attribute Definition Order | 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 …

    0 points
  9. peps.python.orghttps://peps.python.org › pep-0681
    More about peps.python.org
    PEP 681 – Data Class Transforms | 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 …

    0 points
  10. peps.python.orghttps://peps.python.org › pep-0544
    More about peps.python.org
    PEP 544 – Protocols: Structural subtyping (static duck typing) | 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 …

    0 points

Search for “the class site:peps.python.org” on Google, or add !ddg, !w and other shortcuts to any search.