Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'operator': 0.03; 'cpython': 0.05; '21,': 0.07; 'made.': 0.07; 'skip:` 10': 0.07; 'subject:PEP': 0.07; 'formatting': 0.09; 'from:addr:ethan': 0.09; 'from:addr:stoneleaf.us': 0.09; 'from:name:ethan furman': 0.09; 'message-id:@stoneleaf.us': 0.09; 'received:184.172': 0.09; 'received:gator410.hostgator.com': 0.09; '~ethan~': 0.09; 'python': 0.11; 'useful,': 0.14; 'does,': 0.16; 'received:gateway01.websitewelcome.com': 0.16; 'str.format()': 0.16; 'worst': 0.16; 'fix': 0.17; 'wrote:': 0.18; 'all,': 0.19; 'header:User-Agent:1': 0.23; 'instead.': 0.24; 'helpful': 0.24; 'question': 0.24; 'source': 0.25; 'posts': 0.26; 'header:In-Reply- To:1': 0.27; 'chris': 0.29; 'patch': 0.29; "i'm": 0.30; 'code': 0.31; 'that.': 0.31; 'agreed.': 0.31; 'away.': 0.31; 'way?': 0.31; 'yourself.': 0.31; 'this.': 0.32; 'run': 0.32; "i'd": 0.34; "can't": 0.35; 'but': 0.35; 'there': 0.35; 'should': 0.36; 'wrong': 0.37; 'so,': 0.37; 'thank': 0.38; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'either': 0.39; 'new': 0.61; 'received:173': 0.61; "you're": 0.61; 'real': 0.63; 'such': 0.63; 'skip:\xe2 10': 0.65; '8bit%:43': 0.74; 'as:': 0.81; 'carlos': 0.91; 'don\xe2\x80\x99t': 0.91; '2013': 0.98 Date: Tue, 21 May 2013 12:41:36 -0700 From: Ethan Furman User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130106 Thunderbird/17.0.2 MIME-Version: 1.0 To: python-list@python.org Subject: Re: PEP 378: Format Specifier for Thousands Separator References: In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator410.hostgator.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - stoneleaf.us X-BWhitelist: no X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: ([173.12.184.235]) [173.12.184.235]:48903 X-Source-Auth: ethan+stoneleaf.us X-Email-Count: 1 X-Source-Cap: dG9idWs7dG9idWs7Z2F0b3I0MTAuaG9zdGdhdG9yLmNvbQ== X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369166505 news.xs4all.nl 15977 [2001:888:2000:d::a6]:58702 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45687 On 05/21/2013 12:06 PM, Chris “Kwpolska” Warrick wrote: > On Tue, May 21, 2013 at 8:49 PM, Carlos Nepomuceno wrote: >> >> Thank you, but let me rephrase it. I'm already using str.format() but I'd like to use '%' (BINARY_MODULO) operator instead. > > There is no real reason to do this. `str.format()` is the new shiny > thing you should be using all the time. .format() is useful, and has it's place, but % formatting is not going away. >> So, the question is: Where would I change the CPython 2.7.5 source code to enable '%' (BINARY_MODULO) to format using the thousands separator like str.format() does, such as: >> >>--> sys.stderr.write('%,d\n' % 1234567) >> 1,234,567 > > This will make your code unportable and useless, depending on one > patch you made. Please don’t do that. Agreed. Unless you're willing to have your programs either run differently, or not at all, on other systems this is the wrong way to fix it. > Where did you learn Python from? “Python Worst Practice for Dummies”? Chris Warrick, Was that necessary? Useful? Helpful in any way? If you can't be civil, keep your posts to yourself. -- ~Ethan~