Message1940

Author thomas_meister
Recipients
Date 2007-09-26.11:13:49
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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
History
Date User Action Args
2008-02-20 17:18:03adminlinkissue1802626 messages
2008-02-20 17:18:03admincreate