[Python-Dev] Arguments and PyInt_AsLong (original) (raw)

Guido van Rossum guido at python.org
Wed May 31 20:02:06 CEST 2006


file.seek etc. should be changed to use PyNumber_AsIndex or whatever it's called.

On 5/31/06, Georg Brandl <g.brandl at gmx.net> wrote:

Looking at #1153226, I found this:

We introduced emitting a DeprecationWarning for PyArgParseTuple integer arguments if a float was given. This doesn't affect functions like file.seek which use PyIntAsLong to parse their argument. PyIntAsLong calls the nbint slot which silently converts floats to ints. Is that acceptable, should PyIntAsLong not accept other numbers or should the functions be changed? Georg


Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org

-- --Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-Dev mailing list