Comment #14 on issue 2125 by nicolas.pourcelot: Using Integers as python
slices.
http://code.google.com/p/sympy/issues/detail?id=2125
@Aaron:
"There's no point in testing it five times in Python 2.5+, so I would move
the for loop into the else block."
Sorry, I don't understand what you mean. How would you refactor this ?
def test_basic_nostr():
for obj in basic_objs:
for op in ['+','-','*','/','**']:
if obj == 2 and op == '*':
if hasattr(int, '__index__'): # Python 2.5+ (PEP 357)
assert obj * '1' == '11'
else:
raises(TypeError, "obj %s '1'" % op)
--
You received this message because you are subscribed to the Google Groups
"sympy-patches" group.
To post to this group, send email to sympy-patc...@googlegroups.com.
To unsubscribe from this group, send email to
sympy-patches+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy-patches?hl=en.