Author mark.dickinson
Recipients akitada, belopolsky, christian.heimes, josm, loewis, mark.dickinson, rhettinger, robertwb, zanella
Date 2010-05-01.00:53:36
SpamBayes Score 2.63062e-06
Marked as misclassified No
Message-id <1272675220.66.0.964758512902.issue1533@psf.upfronthosting.co.za>
In-reply-to
Content
Currently, in trunk, I get:

>>> range(0.0, 11.0, 1.1)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: range() integer start argument expected, got float.

But with Alexander's patch on trunk, I get:

>>> range(0.0, 11.0, 1.1)
[0L, 1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L]

I'm not sure whether this is intentional or not, but IIRC it was a very deliberate choice not to allow float arguments to range (especially when, as here, the arguments are simply being truncated).  I don't think this is an acceptable change for 2.7 (still less for 2.6).

Any patch for this issue should not change the behaviour for small arguments.

IMO, the *right* solution is to convert arguments via __index__ when possible (as 3.x appears to already do).  However, this would be a new feature.  I suggest closing this as a 'won't fix'.
History
Date User Action Args
2010-05-01 00:53:40mark.dickinsonsetrecipients: + mark.dickinson, loewis, rhettinger, belopolsky, christian.heimes, josm, robertwb, zanella, akitada
2010-05-01 00:53:40mark.dickinsonsetmessageid: <1272675220.66.0.964758512902.issue1533@psf.upfronthosting.co.za>
2010-05-01 00:53:38mark.dickinsonlinkissue1533 messages
2010-05-01 00:53:36mark.dickinsoncreate