Comment #2 on issue 2950 by [email protected]: Rational() doesn't work with floats
http://code.google.com/p/sympy/issues/detail?id=2950

I believe we discussed this and this is not the way to go: "In the face of ambiguity, refuse the temptation to guess." Rational doesn't have to guess when it gets a string; it would have to guess at what you want when you pass a float since the float representing a rational may not be exact and there's no way to tell what the user intended if such a float is obtained. The docstring is pretty clear about the input/output of Rational: it expects ints or a string; it converts floats to ints. If one want to get a rational from the division of 2.5 and 3.5 they should try `nsimplify(2.5/3.5)`

I would mark this as WontFix but will leave it in case there is other comment.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" 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-issues?hl=en.

Reply via email to