Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #58223

Re: Python wart

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.008
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'subsequent': 0.05; 'subject:Python': 0.06; '*args,': 0.09; 'whichever': 0.09; 'developers,': 0.11; 'def': 0.12; '**kwargs)': 0.16; '**kwargs):': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'wrote:': 0.18; 'print': 0.22; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'leave': 0.29; 'message-id:@mail.gmail.com': 0.30; 'fri,': 0.33; 'received:google.com': 0.35; 'skip:o 20': 0.38; 'nov': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'you.': 0.62; 'ps.': 0.84; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=naE3ng9yQXNW/YBYVtHTSGORhVJ7oiHZ7O3ArRAGRoY=; b=r6pMzJ9lLW2Nrwczbw4k6MGhpYldU969mBT+BRiIMeq3wpH8TUFNAqB665lCECUM9W x5OgETaPurMjyRuJEbWiImXnTMtMztrdmMZanWKf7exl5CSXBpp8Lmrcg4TcTuCVlm3D LvbjnJjS29rqD0Y0hryu3O057E/MxD2xfaGlFwtj9JfMff6YIdAQ8UkK9fEyn79Lo21d tj0/yz2H5nZ8CbIo6+lqJZzy7lY3RB18YOSqmBEo+GjNaTWC4Kf2thxa5M3R7InY2/xH TFKPGdiyDOZzCGd1Oo8U+j3OSelzZRQZOyqzui0V2bo6H+cbusqB2O1Q8wUUA5amY/b8 R18g==
MIME-Version 1.0
X-Received by 10.52.0.81 with SMTP id 17mr267894vdc.50.1383270889849; Thu, 31 Oct 2013 18:54:49 -0700 (PDT)
In-Reply-To <CAPTjJmocz_Kq-TxFzOBRCmq_xxVWdrYiz8LapRSr-r3LXpuAKw@mail.gmail.com>
References <l4v12j$98o$1@ger.gmane.org> <CAPTjJmocz_Kq-TxFzOBRCmq_xxVWdrYiz8LapRSr-r3LXpuAKw@mail.gmail.com>
Date Fri, 1 Nov 2013 12:54:49 +1100
Subject Re: Python wart
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1898.1383270899.18130.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1383270899 news.xs4all.nl 15891 [2001:888:2000:d::a6]:34060
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:58223

Show key headers only | View raw


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 | NextNext in thread | Find similar | Unroll thread


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