I'm trying to fix sympy.vector.Point so that it follows the args
invariant. Right now, there is a check that the parent_point must be a
Point instance, but it can also be None, in which case, it is set to a
Symbol. This causes a Point constructed in such way to not follow
expr.func(*expr.args) == expr.

Example:

In [11]: from sympy.vector import *

In [12]: C = CoordSysCartesian('C')

In [13]: C.origin.func(*C.origin.args)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-13-e75fb47c767f> in <module>()
----> 1 C.origin.func(*C.origin.args)

/Users/aaronmeurer/Documents/Python/sympy/sympy-scratch/sympy/vector/point.py
in __new__(cls, name, position, parent_point)
     19         if (not isinstance(parent_point, Point)
     20                 and parent_point is not None):
---> 21             raise TypeError("parent_point should be a Point instance")
     22         #Create an object
     23         if parent_point is None:

TypeError: parent_point should be a Point instance

I don't know how to fix this because I don't know what the
parent_point should be set to in this case (I'm not completely clear
on the mathematics there).

THIS IS BLOCKING THE RELEASE, SO IMMEDIATE HELP WOULD BE APPRECIATED.

As a side note, the fact that this sort of thing exists in SymPy is
embarrassingly bad. We should fix test_args to test that objects are
recreatable from their arguments and put a moratorium on new objects
that don't follow that rule.

Aaron Meurer

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6JgW0_qJcFe8h6YYeYjdt0t0DyDjifC_mHo5K%3DfHugiHQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to