[Patches] [ python-Patches-1633807 ] from __future__ import print_function

SourceForge.net noreply at sourceforge.net
Fri Jan 12 08:31:26 CET 2007


Patches item #1633807, was opened at 2007-01-12 18:13
Message generated for change (Comment added) made by anthonybaxter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1633807&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Core (C code)
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Anthony Baxter (anthonybaxter)
Assigned to: Nobody/Anonymous (nobody)
Summary: from __future__ import print_function

Initial Comment:
This was done partly as a learning exercise, partly just as a vague idea that might prove to be practical (chatting with Neal at the time, but all blame is with me, not him!)

The following adds 'from __future__ import print_function' to 2.x. When this is enabled, 'print' is no longer a statement. Combined with copying bltinmodule.c:builtin_print() from the p3yk trunk, this should give some compatibility options for 2.6 <-> 3.0

Note that for some reason I don't fully understand, this doesn't work in interactive mode. For some reason, in interactive mode, the parser flags get reset for each line. Wah. 

----------------------------------------------------------------------

>Comment By: Anthony Baxter (anthonybaxter)
Date: 2007-01-12 18:31

Message:
Logged In: YES 
user_id=29957
Originator: YES

Updated version of patch - fixes interactive mode, adds builtins.print

File Added: print_function.patch

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1633807&group_id=5470


More information about the Patches mailing list