I've never seen bugs determined by operations such as:
"foobar" * -1
and to be honest I've never seen code like that because the semantics
is somewhat senseless to me but I think the behavior of the expression
evaluation of "Sequence * negative integer" should be changed from:
>>> "foobar" * -1
''
>>> ["foobar"] * -1
[]
>>> ("foobar") * -1
''
to something throwing an exception like when you try to multiplicate
the sequence by a floating point number:
>>> "foobar" * 1.0
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: can't multiply sequence by non-int
It's not a big deal to me but maybe this can be addressed in the
python3000 branch
--
Lawrence
http://www.oluyede.org/blog
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com