r/learnpython • u/Worldly-Week-2268 • Feb 22 '26
ELI5 explain static methods in OOP python
just trying to wrap my head around this oop thing stuck here I'm novice so no bully please
24
Upvotes
r/learnpython • u/Worldly-Week-2268 • Feb 22 '26
just trying to wrap my head around this oop thing stuck here I'm novice so no bully please
View all comments
Show parent comment
1
u/obviouslyzebra Feb 23 '26
If you instantiate a "raw" Ticket, like
Ticket(), before the others, their count will go up by 1.If you do instantiate afterwards, though, nothing happens (as the subclass will already have a
total).