General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Anony Mousse
Indently
comments
Comments by "Anony Mousse" (@anon_y_mousse) on "10 Important Python Concepts In 20 Minutes" video.
I would argue that in example 10, that address isn't even useful for the programmer. However, with regards to constants, could you not overload the assignment operator for a class and prevent assignments from altering the constant? I know that's likely pointless since the user could override the function, but it would at least be one more step you could take which might prevent accidental reassignments. Also, why don't type annotations generate errors? I was playing with 3.11 and I'd swear that they generated errors in function signatures, but 3.14 doesn't, so either they changed that behavior or I was remembering incorrectly, but either way I think they should generate errors within the language interpreter in all cases where you use the wrong type.
2