A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-December/058560.html below:

[Python-Dev] PEP 8 updates/clarifications

[Python-Dev] PEP 8 updates/clarificationsNick Coghlan ncoghlan at gmail.com
Mon Dec 12 02:16:55 CET 2005
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
More information about the Python-Dev mailing list

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