On 25.06.2012 15:16, Sergiu Ivanov wrote:
On Mon, Jun 25, 2012 at 4:59 PM, Aaron Meurer<[email protected]>  wrote:

The most common interface for your class and .args do not have to be
the same. .args just has to be one of the legal interfaces. Many
classes store a .args that is different from what would usually be
entered, for varying reasons.  I think the most common is a
canonicalization that would be more annoying for a user to enter but
is more convenient to parse, but I suppose an equally legitimate
reason would be to avoid computing something again.

Indeed, I think I get your point.

I hope I understood your question correctly. Otherwise, a specific
example might help.

I'll give more details.  The class DiagramGrid lays out a Diagram in a
grid.  DiagramGrid internally creates a grid, in which it places the
objects of the supplied Diagram.  Thus, the sole purpose of existence
of DiagramGrid is to lay out a Diagram.

According to the reasoning you and Stefan have provided, I should also
allow the construction of a DiagramGrid from a Diagram *and* a grid,
into which the Diagram has already been laid out.  Is that so?

Or, perhaps, I am abusing Basic and Basic.args in general?


[I'm sorry for not chipping in earlier, I felt my understanding of the python and sympy philosophies was not strong enough to say something meaningful.]

I have been wondering about this. DiagramGrind is really an internal, or perhaps typographic, representation of the diagram, and no longer a mathematical one. Why should it use Basic as superclass at all? It's not like it can be put meaningfully into any kind of expression at all, can it?

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