Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #58223
| References | <l4v12j$98o$1@ger.gmane.org> <CAPTjJmocz_Kq-TxFzOBRCmq_xxVWdrYiz8LapRSr-r3LXpuAKw@mail.gmail.com> |
|---|---|
| Date | 2013-11-01 12:54 +1100 |
| Subject | Re: Python wart |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1898.1383270899.18130.python-list@python.org> (permalink) |
On Fri, Nov 1, 2013 at 12:53 PM, Chris Angelico <rosuav@gmail.com> wrote:
> orig_print = print
> def print(fmt, *args, **kwargs):
> orig_print(fmt%args, **kwargs)
PS. To be courteous to subsequent developers, you might want to
instead leave print as it is, and create your own printf:
def printf(fmt, *args, **kwargs):
print(fmt%args, **kwargs)
Take your pick, whichever way works for you.
ChrisA
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Python wart Chris Angelico <rosuav@gmail.com> - 2013-11-01 12:54 +1100
Re: Python wart Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-01 00:11 -0700
Re: Python wart Chris Angelico <rosuav@gmail.com> - 2013-11-01 18:59 +1100
Re: Python wart Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-01 09:08 +0000
Re: Python wart Chris Angelico <rosuav@gmail.com> - 2013-11-01 20:17 +1100
Re: Python wart Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-11-01 09:32 +0000
Re: Python wart Chris Angelico <rosuav@gmail.com> - 2013-11-01 20:42 +1100
Re: Python wart Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-01 14:47 -0700
Re: Python wart Chris Angelico <rosuav@gmail.com> - 2013-11-02 10:13 +1100
Re: Python wart Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-01 18:11 -0700
Re: Python wart Chris Angelico <rosuav@gmail.com> - 2013-11-02 12:18 +1100
Re: Python wart Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-01 18:26 -0700
csiph-web