Author mark.dickinson
Recipients mark.dickinson
Date 2009-01-27.12:23:55
SpamBayes Score 1.31508e-05
Marked as misclassified No
Message-id <1233059037.74.0.384834765102.issue5080@psf.upfronthosting.co.za>
In-reply-to
Content
Since Python 2.3, PyArg_ParseTuple and friends give a DeprecationWarning
for floating-point arguments where integers are expected.  From
http://www.python.org/download/releases/2.3/NEWS.txt:

- The PyArg_Parse functions now issue a DeprecationWarning if a float
  argument is provided when an integer is specified (this affects the 'b',
  'B', 'h', 'H', 'i', and 'l' codes).  Future versions of Python will
  raise a TypeError.

Can we turn that DeprecationWarning into a TypeError for 2.7?  (It's
already a TypeError in 3.x.) I'd like to see things like 'range(-0.3)'
and 'itertools.combinations(range(3), 5.1)' raise TypeError.

N.B. The relevant format codes in 2.7 include 'I' and 'n' in addition to
the six codes listed above.
History
Date User Action Args
2009-01-27 12:23:57mark.dickinsonsetrecipients: + mark.dickinson
2009-01-27 12:23:57mark.dickinsonsetmessageid: <1233059037.74.0.384834765102.issue5080@psf.upfronthosting.co.za>
2009-01-27 12:23:56mark.dickinsonlinkissue5080 messages
2009-01-27 12:23:55mark.dickinsoncreate