[Python-Dev] future_builtins

Guido van Rossum guido at python.org
Sat Feb 23 20:11:39 CET 2008

On Sat, Feb 23, 2008 at 9:01 AM, Eric Smith
<eric+python-dev at trueblade.com> wrote:
> Guido van Rossum wrote:
>  > I don't think a -3 warning for oct or hex would do any good.
>  I'm curious as to why.  oct and hex have different behavior in 3.0,
>  which is what I thought -3 was for.  hex might be overkill, as the only
>  differences are the "L" and the __hex__ behavior.  But oct is always
>  different.

Well, yeah, but what are you going to do about it? Not use oct()? I
expect that *most* programs using oct() or hex() will work just as
well under 3.0; typically the output is just printed, not parsed or
otherwise further processed.

I think -3 should only warn about things where it's easy to modify the
code so that it continues to work under 2.6 but will also work under
3.0. Forcing people to use "%o" just to get rid of the warning doesn't
make sense to me.

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

More information about the Python-Dev mailing list