[PATCH 1 of 2] extensions: extract descriptions at build time

Cedric Duval cedricduval at free.fr
Sun Jun 28 08:10:57 CDT 2009


Mads Kiilerich wrote:
>> +    target = os.path.join('mercurial', '__extensions__.py')
>
> Names with leading and trailing double underscores are reserved by  
> Python, so I think it would be best to avoid using them. See  
> http://docs.python.org/reference/lexical_analysis.html#reserved-classes-of-identifiers

> (__version__.py is already used by Mercurial, but it is a bad example.  
> Especially when some standard libraries such as pydoc already buts  
> special semantics into that name.)

Thanks for pointing this out. So what might constitute a good place
and name? Trying to maintain some distinction between source modules
and generated ones seems like a good idea still. A single leading
underscore (internal use) perhaps? Or maybe instead, gathering them
into a subpackage in order to avoid further cluttering of mercurial's?

(PEP8 mentions the usage of __version__, but not as a module name)
-- 
Cédric


More information about the Mercurial-devel mailing list