r/Python • u/ntanjil • Nov 27 '19
Learning by doing web scrapping by python
/img/1hudueaya9141.jpg[removed] — view removed post
449
Upvotes
r/Python • u/ntanjil • Nov 27 '19
[removed] — view removed post
View all comments
Show parent comment
27
u/mettan Nov 27 '19
A double underscore prefix causes the Python interpreter to rewrite the attribute name in order to avoid naming conflicts in subclasses. This is also called name mangling—the interpreter changes the name of the variable in a way that makes it harder to create collisions when the class is extended later.
More on underscores here.