Python Forum
[solved] Classes, assign an attributes to a class not to instances..
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] Classes, assign an attributes to a class not to instances..
#5
Thanks again @Gribouillis,

I've I read again the documentation about python classes and especially the mechanism between the
Class attributes and Instance attributes.

In my initial post I wanted to be able to compare a default dictionary inside a class definition against the same dict. but from a instance. In short compare the Class dict Vs the instance Dict.

So the easiest way (for me) is to create first an instance that will be the 'default' and all the rest of the instance will be the one to work with and to compare to the 'default one'.

Thumbs Up
[Image: NfRQr9R.jpg]
Reply


Messages In This Thread
RE: Classes, assign an attributes to a class not to instances.. - by SpongeB0B - May-20-2023, 04:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [SOLVED] [listbox] Feed it with dict passed to class? Winfried 3 249 May-13-2024, 05:57 AM
Last Post: Larz60+
  [SOLVED] [ElementTree] Grab text in attributes? Winfried 3 1,673 May-27-2022, 04:59 PM
Last Post: Winfried
  [Solved] Novice question to OOP: can a method of class A access attributes of class B BigMan 1 1,360 Mar-14-2022, 11:21 PM
Last Post: deanhystad
  Distinguishing different types of class attributes Drone4four 4 2,166 Feb-21-2022, 06:34 PM
Last Post: deanhystad
  Calls to Attributes of a Class SKarimi 3 3,477 Apr-22-2021, 04:18 PM
Last Post: SKarimi
  Listing Attributes of Objects & Classes JoeDainton123 4 2,408 Aug-28-2020, 05:27 AM
Last Post: ndc85430
  How to create a varying qty of instances of a Class and name them? KM007 2 2,091 May-29-2020, 12:30 PM
Last Post: KM007
  Class Instances called in the wrong order IanIous 4 2,913 Mar-06-2020, 02:16 PM
Last Post: IanIous
  SQL Alchemy dynamic class - declarative_base losing attributes mrdominikku 4 3,798 Jan-10-2020, 06:46 PM
Last Post: mrdominikku
  How to access class variable? instances vs class drSlump 5 3,437 Dec-11-2019, 06:26 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020