Ed Leafe wrote:
On Sep 9, 2005, at 9:36 AM, Paul McNett wrote:
You can take the convention strictly, like a traffic law, and make
such a rule, or you can try to sort out the intent of the convention
or law and live by that.
This is coming from the guy who objected to the method used to
validate all the fields in a DataSource being named in the plural? ;-)
Yup, I'm an enigma. To my credit, though, I believe I've been most
nitpicky about things that our endusers will see. I want them to see a
consistent API across the entire framework, and I want them not to see
things that they don't need to deal with.
validateField() is the right name, because it is validating one field
for every call. validateFields() would be appropriate for a function
that iterated through the field names and called validateField(fld) for
each one.
Whenever I see a _ prefacing an identifier in Python source code, I
think "ah, this is something internal to the workings that I'll not
concern myself with".
Tell you what: add this to the post 1.0 list of things to do. When
we have reached that goal, we can treat Dabo as a complete self-
contained entity, and create our own conventions, and then go through
every method of every class to determine if a developer should ever
call it directly, and if not, change the name to whatever convention we
decide. I would suggest using something other than an initial
underscore, as that already means something to Python folk.
A convention is just a convention. We aren't messing with the intent of
this convention, but applying that intent to our use. Any other prefix
we come up with would be completely nonconventional and confusing. Plus,
there isn't any non-alphanumeric char we can use other than _.
I realize that there are plenty of examples of things exposed to the
public API that shouldn't be (everything in propertyHelperMixin, for
example), and I'm not overly worried about those for now. At some point,
we should identify and clean them up. But for new things we add, it just
makes sense to me to hide the things that aren't intended to be part of
the public API.
But we can come back to this. Eventually, as we stabilize, we'll want to
agree on a rule. For now, it really isn't too much of a big deal, and
right now I couldn't care less that it is named registerObject().
--
Paul McNett
http://paulmcnett.com
http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev