On Fri, 2005-11-04 at 22:56 -0600, Ian Bicking wrote: > Sean Cazzell wrote: > > The TurboGears site suggests PEP 8 style be used but I have noticed > > CherryPy, SQLObject and TG mostly use mixedCase style for method names. > > So is the official recommendation PEP 8 but mixedCase methods? > > SQLObject gets that style from Webware. But otherwise I've personally > moved to underscore separated in my other projects. But it's really > mixed everywhere; I can't even figure out what Zope 3 prefers, for > instance (they often have good style guidelines, but unfortunately > sometimes as vague as everyone else). PEP 8 is vaguely neutral on > underscores vs. mixed case, at least for methods.
I don't have very strong feelings one way or the other as long as things are consistent. It is annoying to have to constantly stop and try to remember if a method is foo.doSomething or foo.do_something. But I am noticing the core of TG and most of the third-party components use mixedCase while some of the newer TG code is dutifully following the recommended PEP 8 underscore style. This means TG is not even using consistent naming itself. Since SQLObject and CherryPy use mixedCase style TG probably should break with the PEP in this case. FWIW, I don't think that PEP 8 is neutral on this topic, but we have to live with what we have. Kind Regards, Sean Cazzell

