Checking the flag value passed with calling

44 views
Skip to first unread message

Gaurav Dhingra

unread,
May 29, 2015, 12:06:10 AM5/29/15
to sy...@googlegroups.com
Hi all

I am doing this
>>> from sympy import *
>>> a = Point(1, 3 , evaluate=False)

In this case the default value of `evaluate` is `False`.
In this,  is there a way using which i can identify that with what value was `evaluate` passed (in this case True) ?
Though if this question does not make any sense feel free to tell me.

Gaurav Dhingra

AMiT Kumar

unread,
May 30, 2015, 1:36:15 PM5/30/15
to sy...@googlegroups.com
Hi!

The default value of evaluate in Point class is True, which means
Floats are automatically converted to Rational unless the
evaluate flag is False.

    >>> Point(0.5, 0.25)   # default is evaluate=True
    Point(1/2, 1/4)
    >>> Point(0.5, 0.25, evaluate=False)
    Point(0.5, 0.25)



AMiT Kumar
Delhi Technological University

Gaurav Dhingra

unread,
May 31, 2015, 8:19:33 AM5/31/15
to sy...@googlegroups.com
Sorry perhaps if my question is not clear. This is my question framed in better way
For ex Line( Point(1, 2.3, evaluate=False), Point(2.2, 1)) for this case can i somehow know in the code of `class of Line` that what were the argument's (point's)  `evaluate` value ?
With the first point it is `False` while with the second being `True`. Hope this questions sounds clear.
Reply all
Reply to author
Forward
0 new messages