Le samedi 05 mai 2012 à 22:18 +0200, [email protected] a écrit : > It started with my question about __new__ vs __init__ here > https://groups.google.com/d/msg/sympy/9somJQfmrcw/WfUrUoltmEEJ > > Sometimes __new__ is necessary, so instead of wondering when to use > __init__ and when __new__ we always use __new__ (Ronan's answer). > > However, as Aaron asked: > > A lot of classes in the core have __new__ methods that return > > Basic.__new__(cls, *args, **kwargs) (do a grep for Basic\.__new__ to > > see what I mean). Any idea why this is done? > It's just calling its base class. That's perfectly ordinary behaviour for a subclass method that overrides its base class. I don't understand what's surprising about that.
-- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sympy?hl=en.
