Joined
Last Seen
0 Reputation Points
Unknown Quality Score
No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
0 Endorsements
Ranked #36.9K
The basic set-up is: [CODE=python] class A(): def __init__(self): self.var = 1 @staticmethod def do_stuff_with_var(self): # A method which uses self.var ... class B(A): def __init__(self): A.__init__(self) b1 = B() b2 = B() list_of_B_instances = [b1, b2] for instance in list_of_B_instances: instance.do_stuff_with_var(instance) [/CODE] However the last line of code raises … |