keyword: remove docstrings to ease translation

Bill Barry after.fallout at gmail.com
Tue Feb 10 08:25:26 CST 2009


Christian Ebert wrote:
>> But I would be glad to see a better solution :-)
>>     
>
> Some script that extracts only the docstrings of the functions
> that are listed in cmdtable?
>   
Does python have some sort of attribute mechanism?

We could do something like:

[public]
def commit( ...

what about starting non-public-api docstrings with a quote char (or 
something else, perhaps just a space?):
>  def utcdate(date):
>     ''''Returns hgdate in cvs-like UTC format.'''
>   
The extra quote shouldn't be a problem from pyshell but it would make it 
very easy to know if a docstring is made for public usage or not. Is 
there a PEP for this somewhere?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial-devel/attachments/20090210/e771134d/attachment.htm 


More information about the Mercurial-devel mailing list