On Thursday 19 February 2009, Christian Theune wrote: > Which attribute naming is current? > ================================== > > Do we use under_scores or mixedCaseNames? > > I think I remember that we decided to follow PEP 8 for new code and > invoke the "local consistentency" rule on old code. Is that correct?
Depends on the namespace.ZC has decisively decided to go with underscores, so all packages in the zc namespace would be like that. The zope and z3c namespace use camel-case. > Global variable names > ===================== > > I don't understand that rule. I kept it around because someone might be > able to explain it more in-depth and whether it still applies. Well, factories (most often classes) should be capitalized. Sometimes helper-functions act like classes in that they construct a new objects, then this rule suggests that it should also be capitalized. I am not sure I like that, but I can live with it. All other functions should be mixed case. > Import ordering > =============== > > Jim proposed an alternative rule for ordering imports. Is this official? > > (My vote is +1 on it) We commonly put import * before from * import *. But otherwise I agree with that rule and I started doing it this way as well. I have found the PEP8 recommendation hard to follow in certain cases, since it is subjective. Regards, Stephan -- Stephan Richter Web Software Design, Development and Training Google me. "Zope Stephan Richter" _______________________________________________ Zope-Dev maillist - [email protected] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
