top | item 34539058

(no title)

clawlor | 3 years ago

The leading double underscore functions differently from a leading single underscore in this case:

> Any identifier of the form __spam (at least two leading underscores, at most one trailing underscore) is textually replaced with _classname__spam, where classname is the current class name with leading underscore(s) stripped.

See https://docs.python.org/3/tutorial/classes.html#private-vari...

discuss

order

No comments yet.