0
Static Instance Attributes (Python OOP)
Hello guys, it's me again đ€Ł I want to ask something, in my code below, I have an attribute named "info", and basically what info does is it collects information about hero's objects (Its name and hp) But, when I changed the hero's name, the info attribute didn't change. Even though the hero's name did change. So what happens here? Does string formatting make info attribute to be static? I know we could use getter method instead, but I just wanna know what's happening under the hood. Sorry If my English is pretty lousy, Thank You đ https://code.sololearn.com/cF2Ttl315Baz/?ref=app
1 Answer
+ 2
~ swim ~ Rithea Sreng Thank you so much guys đđ, yeah why I don't think that way before đ€Ł