[Python-Dev] Patches: 1 for the price of 10.

Michael Hudson mwh at python.net
Thu Dec 23 17:50:35 CET 2004


Titus Brown <titus at caltech.edu> writes:

> -> > Apparently file.seek doesn't have this DeprecationWarning though..
> -> > Strange, that.
> -> >  >>> f.seek(3.6)
> -> >  >>> f.tell()
> -> > 3L
> -> 
> -> That's a bug. Who'll fix it?
>
> Added:
>
> +         if (PyFloat_Check(offobj))
> +             PyErr_Warn(PyExc_DeprecationWarning,
> +                        "integer argument expected, got float" );
>
> see attached diff.  I also attached it to the patch at SourceForge,
> with a comment, just to keep the record straight.

You should check the return value of PyErr_Warn in case the user
passed -Werror on the command line.

> This seems like a reasonable resolution to patch #1067760, to me...

I guess I could look at that -- but when I'm not on dialup at my
parents' house...

Cheers,
mwh

-- 
  I love the way Microsoft follows standards.  In much the same
  manner that fish follow migrating caribou.           -- Paul Tomblin
               -- http://home.xnet.com/~raven/Sysadmin/ASR.Quotes.html


More information about the Python-Dev mailing list