I am new to Python and I just read something that I thought was peculiar. Is it true that a user can add to the variables of a class just by naming the new variable? Like: ClassObject.var1=5 Would this create a variable "var1" inside the class even though the creator of the class never intended it to be there (there was no var1 originally)? If I mistype the variable in my code, a new variable inside the class is created rather than flagging the error? Is there a way to prevent this so users cannot add variables? It seems to me that the user could just override a class with unrelated data. Thanks in advance, Robert Johnson
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4