On 08.06.2012 19:56, Sergiu Ivanov wrote:
Hello,

Consider the following situation:

   class MyClass(Basic):
     def __init__(self, argument):
       self._args = (argument,)

Is this a proper way to interact with arguments, or should I use
__new__ instead of __init__ and directly invoke Basic.__new__ from
there?

Grepping over SymPy source has told me that some classes do define
__init__, but these classes (in physics, for example; I've only
checked a couple) do not derive from Basic.  This pushes me towards
believing that I shouldn't really rely on __init__.


I believe this is correct.

--
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.

Reply via email to