Status: Accepted
Owner: smichr
Labels: Type-Defect Priority-Medium

New issue 1815 by smichr: shift operator
http://code.google.com/p/sympy/issues/detail?id=1815

In discussion

http://groups.google.com/group/sympy/browse_thread/thread/214eaae150fc08a/e91b563a8ce01347?lnk=gst&q=shift+operator#e91b563a8ce01347

there was raised the issue of &, >> and << being overidden in sympy. Ondrej
had thought it better that this were not the case. As of today I wish that
it were not the case.

S(4)>>3
Implies(4, 3)
4>>3
0
S(4)&3
And(3, 4)
4&3
0

On the other hand, if the sympy objects are just un-sympified, i.e. if you
just convert them back to integers (rather than Integers) then as you can
see above, all is fine.

Does anyone have strong feelings about this syntax being customized to
sympy rather than having standard pythonic meaning? Should a test be done
with these operators to see if the operands are Integers and then treat
them as integers?

/c

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

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