Python Product Coding Guidelines? (constructor=...)
Hi! When I "grep" for the constructor syntax in the __init__.py files I see that most people use the form constructor(manage_addFoo, ...) The DevGuide just calls the function addForm. I think it would be good if there would be a guideline. This makes it easier to read other peoples code. What do you think?
I think that the "manage_" prefix to stuff should die. I actually prefer calling the constructor constructFoo but nobody but me does that. ;-) I don't think there's an easy way to consensus... but you could comment in the Dev Guide about it so that at least when folks read it they wikll think about it too., Thomas Guettler wrote:
Hi!
When I "grep" for the constructor syntax in the __init__.py files I see that most people use the form constructor(manage_addFoo, ...)
The DevGuide just calls the function addForm. I think it would be good if there would be a guideline. This makes it easier to read other peoples code.
What do you think?
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- Chris McDonough Zope Corporation http://www.zope.org http://www.zope.com "Killing hundreds of birds with thousands of stones"
Thomas Guettler writes:
When I "grep" for the constructor syntax in the __init__.py files I see that most people use the form constructor(manage_addFoo, ...)
The DevGuide just calls the function addForm. I think it would be good if there would be a guideline. This makes it easier to read other peoples code. I like the ZDG name more the the "manage_..." form.
But, it think this has really only minor importance. Dieter
At 10:24 PM 1/25/2002 +0100, Dieter Maurer wrote:
Thomas Guettler writes:
When I "grep" for the constructor syntax in the __init__.py files I see that most people use the form constructor(manage_addFoo, ...)
The DevGuide just calls the function addForm. I think it would be good if there would be a guideline. This makes it easier to read other peoples code. I like the ZDG name more the the "manage_..." form.
But, it think this has really only minor importance.
BTW, I am just writing up a coding style guide proposal for Zope 3, so please feel free to write some too or comment on things. Note however that the Zope 3 architecture is quiet different; so, for example, there is no need for "manage_*" methods. http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/CodingStyle Regards, Stephan -- Stephan Richter CBU - Physics and Chemistry Student Web2k - Web Design/Development & Technical Project Management
participants (4)
-
Chris McDonough -
Dieter Maurer -
Stephan Richter -
Thomas Guettler