A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-March/077858.html below:

[Python-Dev] 2to3 and print function

[Python-Dev] 2to3 and print functionCollin Winter collinw at gmail.com
Wed Mar 19 23:44:10 CET 2008
On Wed, Mar 19, 2008 at 12:04 PM, David Wolever <wolever at cs.toronto.edu> wrote:
> At the moment, fix_print.py does the Right Thing when it finds ``from
>  __future__ import print_function``... But the 2to3 parser gets upset
>  when print() is passed kwargs:
>  $ cat x.py
>  from __future__ import print_function
>  print("Hello, world!", end=' ')
>  $ 2to3 x.py
>  ...
>  RefactoringTool: Can't parse x.py: ParseError: bad input: type=22,
>  value='=', context=('', (2, 26))
>
>  What would be the best way to start fixing this?
>
>  #2412 is the related bug.

You can pass -p to refactor.py to fix this on a per-run basis. See
r58002 (and the revisions it mentions) for a failed attempt to do this
automatically.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4