1,129 matching pages, found in 260 ms

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

  1. discuss.python.orghttps://discuss.python.org › t › class-variables › 18214
    More about discuss.python.org
    Class variables - Python Help - Discussions on Python.org

    ForumAug 14, 2022. … it goes on to the class, and the superclasses. So looking up instance.attr will also return ‘from the class’. But when we assign to the instance attribute: instance.attr = 'from the instance' now …

    0 points
  2. discuss.python.orghttps://discuss.python.org › t › accessing-attributes-of-a-class › 13873
    More about discuss.python.org
    Accessing attributes of a class - Python Help - Discussions on Python.org

    ForumFeb 22, 2022. … if dir() on a class reported the methods and properties that its metaclass defines for the class object in addition to the methods and properties that the class defines for its instances …

    0 points
  3. discuss.python.orghttps://discuss.python.org › t › class-coding-and-usage › 25616
    More about discuss.python.org
    Class coding and usage - Python Help - Discussions on Python.org

    ForumApr 9, 2023. … As suggested your Movie class could know how to play() the movie, access IMDB to return a list of actors, etc. Without the methods the class is missing that behaviour. What is …

    0 points
  4. discuss.python.orghttps://discuss.python.org › t › 3-12-slot-classes-wishlist › 20742
    More about discuss.python.org
    3.12 slot classes wishlist - Ideas - Discussions on Python.org

    Nov 4, 2022. … Add slotness to a class after the fact. Right now, when creating a slot class, we need to recreate the class from scratch to add slots to it. We’ve tried to make …

    0 points
  5. discuss.python.orghttps://discuss.python.org › t › doing-something-evil-deleting-… › 19184
    More about discuss.python.org
    Doing something evil: deleting a class (not instance) from memory - Python Help - Discussions on Python.org

    ForumSep 16, 2022. … Namely, if one of the classes is renamed, or one of the classes is removed, it will still be in memory in the interpreter, and when the parent class cycles through all …

    0 points
  6. discuss.python.orghttps://discuss.python.org › t › class-variables-individual-or-… › 8337
    More about discuss.python.org
    Class variables: individual or single library - Python Help - Discussions on Python.org

    ForumApr 21, 2021. … thread as arguments into the function, put the function into the queue/QThreadpool, and when the function runs it emits signals which I copy back into class variables. When the function ends …

    0 points
  7. discuss.python.orghttps://discuss.python.org › t › differentiating-between-initia… › 91172
    More about discuss.python.org
    Differentiating between initialized and uninitialized assignments on class toplevel - Typing - Discussions on Python.org

    ForumMay 8, 2025. … actually gets added to the class Foo . So attribute-accessing x from class Foo directly is almost always a runtime crash. But if we try to assign an initial value to the …

    0 points
  8. discuss.python.orghttps://discuss.python.org › t › class-composition-between-two-… › 37531
    More about discuss.python.org
    Class Composition Between Two Classes - Python Help - Discussions on Python.org

    ForumOct 31, 2023. … Issue 1 I referenced the tk.Tk class as the ‘master’ class because the code snippet is based on this module. Additionally, in my test snippet: Login - Base class (inheriting from the tk.Tk …

    0 points
  9. discuss.python.orghttps://discuss.python.org › t › dataclass-transform-inheriting… › 55734
    More about discuss.python.org
    Dataclass_transform - Inheriting class doesn't recognize kw_only=True from parent class - Typing - Discussions on Python.org

    ForumJun 14, 2024. Dataclass_transform - Inheriting class doesn't recognize kw_only=True from parent class Typing Avishayy (Avishay Matayev) June 14, 2024, 5:13am 1 Following the post on the mypy issue tracker – PEP-681 …

    0 points
  10. discuss.python.orghttps://discuss.python.org › t › access-class-object-in-class-b… › 56560
    More about discuss.python.org
    Access class object in class body - Python Help - Discussions on Python.org

    ForumJun 24, 2024. … can’t add a base class to the class that has a __init_subclass__ defined? That would be the easiest and earliest way to collect such functions while having the class object available …

    0 points

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