Python Forum
problem with simple class code
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem with simple class code
#3
Attribute condition is defined before the initialization, so it's an attribute of the class itself and not of the class objects. When you modify the value of that attribute it therefore modifies it for all objects.
Reply


Messages In This Thread
problem with simple class code - by diegoraffo - Jan-25-2018, 07:35 PM
RE: problem with simple class code - by j.crater - Jan-25-2018, 07:38 PM
RE: problem with simple class code - by league55 - Jan-25-2018, 08:49 PM
RE: problem with simple class code - by ka06059 - Jan-27-2018, 12:15 AM
RE: problem with simple class code - by snippsat - Jan-27-2018, 12:54 AM
RE: problem with simple class code - by ka06059 - Jan-27-2018, 02:31 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How does this code create a class? Pedroski55 6 759 Apr-21-2024, 06:15 AM
Last Post: Gribouillis
  class definition and problem with a method HerrAyas 2 425 Apr-01-2024, 03:34 PM
Last Post: HerrAyas
  Help with simple code JacobSkinner 1 497 Mar-18-2024, 08:08 PM
Last Post: deanhystad
  I have a code which is very simple but still I cannot detect what's wrong with it max22 1 625 Nov-07-2023, 04:32 PM
Last Post: snippsat
  A simple problem, how best to solve it? SuchUmami 2 821 Sep-01-2023, 05:36 AM
Last Post: Pedroski55
  help me simple code result min and max number abrahimusmaximus 2 1,040 Nov-12-2022, 07:52 AM
Last Post: buran
  Simple encoding code ebolisa 3 1,605 Jun-18-2022, 10:59 AM
Last Post: deanhystad
  How to solve this simple problem? Check if cvs first element is the same in each row? thesquid 2 1,358 Jun-14-2022, 08:35 PM
Last Post: thesquid
  How would you (as an python expert) make this code more efficient/simple coder_sw99 3 1,924 Feb-21-2022, 10:52 AM
Last Post: Gribouillis
  Simple code question about lambda and tuples JasPyt 7 3,645 Oct-04-2021, 05:18 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

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