Container __get/set/delitem__? (was Re: [Zope3-dev] naming issues: id vs name, delObject vs ?)

Barry A. Warsaw barry@zope.com
Wed, 15 May 2002 02:23:37 -0400


>>>>> "KM" == Ken Manheimer <klm@zope.com> writes:

    KM> I may be weird (rhetorical device; raises a knowing smile in
    KM> everyone:-), but i have *never* gotten over the dissonance of
    KM> ".objectIds()" / ".objectValues()" / ".objectItems()", etc, on
    KM> Zope2 folders.  They were mis-motivated.  Having similarly
    KM> named methods helps those of us with feeble memories remember
    KM> how to do similar things with diverse objects, *in so far as
    KM> the objects are similar*.

Just to agree more <wink>, making Zope more "pythonic" means building
a bridge from what you know to what you don't know.  This is also
known as being habitable, or discoverable, etc.

The point is that our common language is Python, and where Zope is
similar to, or builds on, Pythonic constructs, it too should spell
things Pythonically.  Departures from that should probably be limited
to situations where the differences are important enough that you'll
get into trouble if you look too Pythonic but really aren't
e.g. (perhaps -- but it's late and I'm tired ;), "del obj['usr']" rm's
your /usr directory.

-Barry