What does a double leading underscore (__x) in a class attribute trigger in Python?
Correct answer
D. Name mangling
6 views
D. Name mangling
6 views
Python rewrites __x inside class C to _C__x.
Asked in: Python Interview OOP
https://docs.python.org/3/tutorial/classes.htmlNot sure why the answer is D? Ask here and get an explanation.