On 7/28/06, Greg Ewing <[EMAIL PROTECTED]> wrote:
> Steven Bethard wrote:
>
> > I thought about this for a while, and I think maybe a good rule of
> > thumb (and something like what Python seems to follow) is: "If it's
> > there's an obvious default implementation of a protocol that would be
> > generally useful, it should go on all objects."
>
> Please, no!
>
> One of the things I like about Python is that 'object'
> is very nearly a blank slate. I'd hate to see it cluttered
> up with a pile of methods that someone thought might be
> useful to someone sometime.

Of course not.  That's the whole point.  The only things that belong
there are *protocols* (as in language-defined __XXX__ methods) that
have a sensible default implementation for all objects.  AFAICT, the
only things this really applies to are __hash__ and __eq__ and the
other things that are already there (__class__, __{get|set|del}attr__,
etc.).

STeVe
-- 
I'm not *in*-sane. Indeed, I am so far *out* of sane that you appear a
tiny blip on the distant coast of sanity.
        --- Bucky Katt, Get Fuzzy
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to