Jim Fulton wrote: > FWIW, as a general rule, I like using a single trailing underscore, > especially for keywords. It allows the use of meaningful and easy > to remember names. When the name of a variable should be "class" or > "for" or whatever, it's easy, as a Python programmer, to remember that > I need to add a trailing _. As a reformed abuser of single-character > variable names, I've come to really hate abbreviations. It's not only > easier to use unabbreviated names, it's easier to remember them when > reading code. (Note that ease of use hinges on editors that automate > typeing of repeated names.) FWIW, I believe scipy uses the trailing underscore to avoid shadowing certain builtins (type_, object_, str_, etc). I thought it was ugly when I first encountered the convention, but the concept is growing on me. . . Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org
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