Not really, with build-in objects there is no entry anywhere for
__add__ or any other special symbols. In the current implementation
of classes, for example, if you override the __repr__ method, you can
no longer get at the default version. That is
class pig_innards:
pass
class spam(pig_innards):
def __repr__(self):
if self.eggs:
return self.ham
else:
return pig_innards.__repr__(self)
So, even though class pig_innards does not implement a __repr__
method, you can still 'repr' one of its instances. But, you can't ask
it for its '__repr__' attribute. The changes necessary to correct
this are not trivial. I happen to think that it should work, and
belive it or not, in my implementation of classes actually does.
B.T.W, I really like the proposal that started this thread.
-- Donald Beaudry DataViews Corporation Software Engineer 47 Pleasant Street don@dvcorp.com Northampton, MA 01060 "So much code, so little time..."