Problem with -3 switch
clp2 at rebertia.com
Fri Jan 9 18:26:27 CET 2009
On Fri, Jan 9, 2009 at 9:17 AM, Aivar Annamaa <concat_names at hotmail.com> wrote:
> I'm getting started with Python and in order to get good habits for Python
> 3, i'd like to run my Python 2.6.1 with Python 3 warning mode.
> When i run
> python -3
> and execute statement
>>>> print 4
> then i expect to see a warning because i've understood that this statement
> is not valid in Python 3
> however no warning appears.
> Have is misunderstood something?
As was recently pointed out in a nearly identical thread, the -3
switch only points out problems that the 2to3 converter tool can't
automatically fix. Changing print to print() on the other hand is
easily fixed by 2to3.
Follow the path of the Iguana...
More information about the Python-list