I am relatively new to Python, I have been playing with a CPython and IronPython. Does IronPython support special methods? For example:
>>> class C: ... v=0 ... def __init__(self,v): ... self.v=v ... def __int__(self): ... return int(self.v) ... >>> c=C(33) >>> print int(c) Traceback (most recent call last): File , line 0, in input##106 File , line 0, in Make##121 TypeError: expected int, found instance This doesn't present CPython with any problems and __int__() is in language reference manual, section 3.3.7 Eugene. _______________________________________________ users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
