Python Forum
Why is this pointing to the objects
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why is this pointing to the objects
#5
This really is interesting. My illusion was that anything within the class block would be instance variable. It appears from what your demonstrating is that unless you but anything within the constructor it remains as class variable. Which meant there's only one instance of the list, since it was defined/declared outside the constructor.
Reply


Messages In This Thread
Why is this pointing to the objects - by hshivaraj - Apr-09-2019, 07:22 PM
RE: Why is this pointing to the objects - by Yoriz - Apr-09-2019, 08:00 PM
RE: Why is this pointing to the objects - by hshivaraj - Apr-09-2019, 08:10 PM
RE: Why is this pointing to the objects - by Yoriz - Apr-09-2019, 08:21 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Sorting Elements via parameters pointing to those elements. rpalmer 3 2,681 Feb-10-2021, 04:53 PM
Last Post: rpalmer
  Installing Python and pointing it to required libraries hooiberg 2 4,385 May-13-2019, 05:55 PM
Last Post: ebolisa
  What are ways of pointing cross-compiled origin source line for python? wyvogew 2 2,890 Feb-02-2019, 03:16 PM
Last Post: wyvogew

Forum Jump:

User Panel Messages

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