Python
Naming and conventions
Nom | Description |
---|---|
_foo | Variable/method is private |
foo_ | Avoid naming conflict with reserved keywords |
__foo | Name mangling: will add the class name as prefix → _ClassName__foo |
__foo__ | Special attribute/method provided by Python |
_ | Temporary/throaway variable |
Resources
Learning
- pythoncheatsheet.org – Big general online cheatsheet
- automatetheboringstuff.com – Open source book about automation with Python
- patrickwalls.github.io/mathematicalpython – An introduction to mathematical computing with Python