[Python-Dev] Deprecate __ private (was Re: PEP 8 updates/clarifications)

Phillip J. Eby pje at telecommunity.com
Tue Dec 13 17:51:28 CET 2005


At 09:53 AM 12/13/2005 -0500, François Pinard wrote:
>Everybody here agrees that this style makes the code much less legible.

I hope you mean, "here at your company or organization", as I disagree.  :)

The current draft API guidelines for Chandler encourage the use of short 
API module names such as 'pim' and 'mail' to allow more clarity as to 
naming, while encouraging import patterns that make module reloading more 
practical during development.  Using a module name as a prefix to a class 
or function name also allows flatter namespaces with fewer imports, 
especially in the case of APIs which contain many features and are 
frequently used.

Of course, we don't do abbreviations or renaming; instead, code like this 
is the common pattern:

     from application import schema

     class Contact(schema.Item):
         name = schema.One(schema.Text)
         # ... etc.



More information about the Python-Dev mailing list