Alternative constructors naming convention

Bruno Desthuilliers onurb at xiludom.gro
Wed Oct 11 08:25:00 EDT 2006


Will McGugan wrote:
> Hi,
> 
> Is there a naming convention regarding alternative constructors? ie
> static methods where __new__ is called explicity. I use lower_case for
> methods in general, but thought maybe CamelCase would be better for
> alternative contstructors to distinguish them from methods...

Well... They are still methods, aren't they ?-)

I don't remember any specific guideline, but FWIW, dict.from_keys() is
an "alternative constructor".

My 2 cents.
-- 
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'onurb at xiludom.gro'.split('@')])"



More information about the Python-list mailing list