[Dev] Coding guidelines follow-up: __revision__ etc.

Katie Capps Parlante capps at osafoundation.org
Tue Aug 31 09:50:20 PDT 2004


We started off with the variables because I saw it somewhere and thought 
it was a readable convention (here's a random example: 
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/162292). We were 
initially tracking author and other information, but Aleks Totic talked 
us out of that. I am perfectly comfortable moving to comments instead. 
Morgen has a good example in application/Parcel.py, where he epydoc's 
the relevant info:

"""
@copyright: Copyright (c) 2004 Open Source Applications Foundation
@license: U{http://osafoundation.org/Chandler_0.1_license_terms.htm}
"""

Cheers,
Katie

Heikki Toivonen wrote:

> I am wondering why are these things variables in the first place, why 
> not put this information in comments instead? Using variables eats a 
> little bit of processing power and memory for something that could be 
> avoided.
> 
> Then each of the __ variables:
> 
> __revision__. Pros: people can submit patches without CVS access and it 
> will be clear which revision they are based on. Cons: your editor needs 
> to automatically reload changed files, you cannot cleanly roll back a 
> commit. What's the balance, can this be removed? Or would this need to 
> wait until we switched to Subversion that could do offline diffs so that 
> when we created a source tarball with .svn dirs others would have 
> everything they needed.
> 
> __date__. Don't see much use for this, same cons as with __revision__. 
> Should be removed.
> 
> __copyright__. Don't see much use for this. Should be just a comment.
> 
> __license__. Don't see much use for this. Should be just a comment.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> 
> Open Source Applications Foundation "Dev" mailing list
> http://lists.osafoundation.org/mailman/listinfo/dev




More information about the Dev mailing list