> Do not use accessor methods, like ``obj.getFoo()`` and > ``obj.setFoo(v)``, instead just expose a public attribute (``obj.foo``). This advice is, of course, not appropriate for all users (properties are not typically in a Python beginner's skill set) or all use cases. It is closer to one person's view of the One-Right-Way(tm). Opinions on programming best practices vary widely, evolve over time, and may be context dependent. > > While, on some level, private variables seem attractive, I think that > > experience (for everyone I know) has shown them to be an attractive > > nuisance. I recommend discouraging them. > > I really really hate double underscores FWIW, I think we have no business dictating to others how they should name their variables. This is doubly true for a convention that has a long history and built-in language support. My preference is to leave PEP 8 for the minimum practices necessary for one programmer to be able to read and maintain another programmer's code. Raymond
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4