Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #93858 > unrolled thread
| Started by | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| First post | 2015-07-15 05:33 -0400 |
| Last post | 2015-07-15 05:33 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Improve usage of Python 3 Terry Reedy <tjreedy@udel.edu> - 2015-07-15 05:33 -0400
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2015-07-15 05:33 -0400 |
| Subject | Re: Improve usage of Python 3 |
| Message-ID | <mailman.533.1436952850.3674.python-list@python.org> |
On 7/14/2015 12:28 PM, Marcos wrote: > Hi! > > Just like many, I want the projects in which I work on to move to Python 3. > > And incredibly, there are a few users on the same project who refuse to > use python 3 simply because of the print statement. > > That has probably already been discussed, but since I actually couldn't > find anything relevant about, I decided to ask here anyway. > > What are the changes of something like > > from __past__ import print_statement 0 > or to make both > > print This already works, like any other name >>> print <built-in function print> To add to what Chris said, this means that print can be rebound just like any other name. For example: >>> import builtins >>> builtins.print <built-in function print> >>> def print(*args, **kwargs): kwargs['sep'] = '|' builtins.print(*args, **kwargs) >>> print(1,2,3) 1|2|3 > and > > print() > > work on Python 3 ? -- Terry Jan Reedy
Back to top | Article view | comp.lang.python
csiph-web