Message1940
Hi,
I found a bug (maybe you see it a feature) in the handling of negative values when using lists and tuples.
If I use a string, then an empty string is returned:
> "0" * (-1)
""
If I use a list or a tuple, then a runtime exception happens
> [0] * (-1)
java.lang.NegativeArraySizeException
> (0,) * (-1)
java.lang.NegativeArraySizeException
Note: CPython returns an empty list or empty tuple instead.
I found this bug/inconsistency when I tried to import decimal.py python source.
Thank you in advance,
Greetings
Weatherman |
|
Date |
User |
Action |
Args |
2008-02-20 17:18:03 | admin | link | issue1802626 messages |
2008-02-20 17:18:03 | admin | create | |
|