This "underscoring" seems to occur a lot, and I was wondering if this was a requirement in the Python language, or merely a matter of convention?
Also, could someone name and explain which functions tend to have the underscores, and why (__init__
, for instance)?
Best Answer
From the Python PEP 8 -- Style Guide for Python Code:
Note that names with double leading and trailing underscores are essentially reserved for Python itself: "Never invent such names; only use them as documented".