Steven D'Aprano wrote: > On Tue, 17 Oct 2006 15:50:47 +0200, Alexander Eisenhuth wrote: > >> Hello, >> >> is there a assignement operator, that i can overwrite? > > No. > > We were just discussing the reasons why Python will not and can not have > an assignment operator just a few days ago. Check the archives for more > details. > > >> class MyInt: >> def __init__(self, val): >> assert(isinstance(val, int)) > > isinstance() considered harmful:
Trying to convert val to an int would probably be better indeed: class MyInt(object): def __init__(self, val): self.val = int(val) My 2 cents -- bruno desthuilliers python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for p in '[EMAIL PROTECTED]'.split('@')])" -- http://mail.python.org/mailman/listinfo/python-list