Alternative constructors naming convention

Will McGugan will at willmcgugan.com
Wed Oct 11 07:09:02 EDT 2006


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...

So which is better?

c = Color.FromHtml(r, g, b)

c = Color.from_html(r, g, b)


Will McGugan
--
http://www.willmcgugan.com




More information about the Python-list mailing list