Posts
 
Reputation
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
~460 People Reached
Favorite Forums
Favorite Tags
Member Avatar for shayallenhill

Which is smarter? class HoldAttr(object): pass a = HoldAttr b = getattr(a, 'attrname', []) b.append(1) setattr(a, 'attrname', b) # or try: b.a.append(1) except AttributeError: b.a = [1] ... or something else? Trying to learn.

Member Avatar for hughesadam_87
0
335
Member Avatar for shayallenhill

I think I can learn a lot from any answer to the two questions in this post. OK, I’ve got a large object. That object has attributes and does things. Those attributes also do things. MOST of what they do is sit there like a list, int, or np.array and …

Member Avatar for shayallenhill
0
125