Terry Reedy <[EMAIL PROTECTED]> wrote: > Mark Seaborn wrote: > > It appears that unbound methods do what you want in the general case > > in Python 2.5 and 2.6. It's just that __lt__ behaves unlike normal > > unbound methods. So this isn't an argument against unbound methods, > > it's an argument for __lt__ not to be a special case. > > It is not a special case. > > >>> def C(object): pass > ... > > >>> C.__hash__ == object.__hash__ > False > > >>> C.__str__ == object.__str__ > False
I assume you meant to use "class" instead of "def", in which case most of the attributes do compare the way you want: >>> class C(object): pass ... >>> C.__hash__ == object.__hash__ True >>> C.__str__ == object.__str__ True # But in Python 2.6: >>> C.__lt__ == object.__lt__ False Mark _______________________________________________ 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