Steven D'Aprano ha escrit: > Once the __new__ method creates the instance and returns, before anything > else happens, the instance's __init__ method is called.
This only happens when the object created by __new__ isinstance of the class invoked in the creation statement, that is: s=MagicStr("lala") executes: s = MagicStr.__new__(MagicStr, "lala") if isinstance(s, MagicStr): type(s).__init__(s, "lala") -- Juan M. Gimeno -- http://mail.python.org/mailman/listinfo/python-list