Comment #30 on issue 1261 by asmeurer: incorrect exponentiation with non-commutative symbols
http://code.google.com/p/sympy/issues/detail?id=1261

Indeed, 10x faster:

In [1]: a = S(1)

In [2]: %timeit a == S.One
1000000 loops, best of 3: 4.21 us per loop

In [3]: %timeit a is S.One
1000000 loops, best of 3: 402 ns per loop

So I guess is should be used over == whenever there is guaranteed to be only one object of that type. Are all the named classes in S like this? Maybe this should be a new issue to fix this everywhere in SymPy.

--
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 sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to