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


Groups > comp.lang.python > #33776

Re: Yet another Python textbook

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <d@davea.name>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'formatting': 0.07; 'method,': 0.07; 'brace': 0.09; 'compact': 0.09; 'cc:addr:python-list': 0.10; 'language,': 0.11; 'boost.': 0.16; 'curly': 0.16; 'reason.': 0.16; 'substituted': 0.16; 'twenty': 0.16; 'string': 0.17; 'wrote:': 0.17; 'exists': 0.17; 'translate': 0.20; 'parameters': 0.20; 'libraries': 0.22; 'cc:2**0': 0.23; "python's": 0.23; 'somewhere': 0.24; 'cc:no real name:2**0': 0.24; 'least': 0.25; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'implemented': 0.27; 'realize': 0.27; 'c++': 0.27; 'chris': 0.28; "i'm": 0.29; 'function': 0.30; 'languages': 0.33; 'another': 0.33; 'version': 0.34; 'exist': 0.35; 'said,': 0.35; 'pm,': 0.35; 'but': 0.36; 'rather': 0.37; 'subject:: ': 0.38; 'some': 0.38; 'sure': 0.38; 'received:192': 0.39; 'received:192.168': 0.40; 'more': 0.63; 'our': 0.65; 'header:Reply-To:1': 0.68; 'received:74.208': 0.71; 'reply-to:no real name:2**0': 0.72; 'expressive': 0.84; 'glad': 0.86; 'hand,': 0.97
Date Wed, 21 Nov 2012 17:58:37 -0500
From Dave Angel <d@davea.name>
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121011 Thunderbird/16.0.1
MIME-Version 1.0
To Chris Angelico <rosuav@gmail.com>
Subject Re: Yet another Python textbook
References <CAB89DN0nusHZU32zP5UbTSUH8P7aXJomssBT-Jge7LEhaOtphg@mail.gmail.com> <CALwzid=3b_Gv3XR5iYvo7Pc0ZjXERB60daT9AjVoOG1OAP9vNg@mail.gmail.com> <CAB89DN0M5NzpoLRtcXRtM4Vs4xrOfw0wZq64GkU-DKy=Ei8HJQ@mail.gmail.com> <mailman.34.1353398989.29569.python-list@python.org> <31a82817-8c9b-4dd2-a468-89d8d081fd1b@googlegroups.com> <mailman.96.1353445247.29569.python-list@python.org> <50AD0962.5080002@ncf.ca> <CAPTjJmr55ZjpF9RBog39QZyTRixh=tTJH-5_pu3YTL4hWmfCAg@mail.gmail.com>
In-Reply-To <CAPTjJmr55ZjpF9RBog39QZyTRixh=tTJH-5_pu3YTL4hWmfCAg@mail.gmail.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Provags-ID V02:K0:Pnblzyraabi6gKDzSjT2FiFrrUA+gPBeZrwHI46pC2z Q1FRbVdBeGTvfBIdm7DwI6xxt/wKN7bphpIkmoOwc3WRUYJiMy 1DAvYc5vrVXHJW0gnlg6r65as2Yc6EF0os823pd9E/mKWH0Qub B0TeCA6IpqLHnwtXTuSScrvGxnfGBCG2ijwDm3uttg2ojVeg8K kf/TCYCsookamDIHMae3gvZf57v0+siDQZq9OsLUWmaJ/6yru+ ygDNFclBmCLGkuKUjy8tccTrhpIZNp7vgx7elAA9Z3fPCr1SFs M+UTTaBKRRQ04I6BqaEkbzF5ix3RMb7MZLv7gYIbkLN4ZvU4A= =
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To d@davea.name
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.181.1353538743.29569.python-list@python.org> (permalink)
Lines 30
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1353538743 news.xs4all.nl 6981 [2001:888:2000:d::a6]:58117
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:33776

Show key headers only | View raw


On 11/21/2012 05:17 PM, Chris Angelico wrote:
> <snip>
>
>
> That said, though, I'm just glad that %-formatting is staying. It's an
> extremely expressive string formatting method, and exists in many
> languages (thanks to C's heritage). Pike's version is insanely
> powerful, Python's is more like C's, but all three are compact and
> convenient.
>
> str.format(), on the other hand, is flexible. It strikes me as rather
> more complicated than a string formatting function needs to be, but
> that may be a cost of its flexibility.
>
>

Some don't realize that one very powerful use for the .format style of
working is that it makes localization much more straightforward.  With
the curly brace approach, one can translate the format string into
another language, and if the parameters have to be substituted in
another order, it's all in one place.

Twenty years ago, I implemented such a thing for our product (C++), for
just that reason.   I'm sure that by now, the libraries exist somewhere
in the C++ stdlibs, or at least in  Boost.

-- 

DaveA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Yet another Python textbook Chris Angelico <rosuav@gmail.com> - 2012-11-20 19:09 +1100
  Re: Yet another Python textbook wxjmfauth@gmail.com - 2012-11-20 06:57 -0800
    Re: Yet another Python textbook Chris Angelico <rosuav@gmail.com> - 2012-11-21 08:00 +1100
      Re: Yet another Python textbook wxjmfauth@gmail.com - 2012-11-21 06:49 -0800
      Re: Yet another Python textbook wxjmfauth@gmail.com - 2012-11-21 06:49 -0800
      Re: Yet another Python textbook "Colin J. Williams" <cjw@ncf.ca> - 2012-11-21 12:03 -0500
        Re: Yet another Python textbook Chris Angelico <rosuav@gmail.com> - 2012-11-22 09:17 +1100
          Re: Yet another Python textbook "Colin J. Williams" <cjw@ncf.ca> - 2012-11-22 07:24 -0500
            Re: Yet another Python textbook Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-22 11:27 -0700
              Re: Yet another Python textbook "Colin J. Williams" <cjw@ncf.ca> - 2012-11-22 17:41 -0500
                Re: Yet another Python textbook Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-23 03:26 +0000
            Re: Yet another Python textbook Terry Reedy <tjreedy@udel.edu> - 2012-11-22 17:12 -0500
        Re: Yet another Python textbook Dave Angel <d@davea.name> - 2012-11-21 17:58 -0500
        Re: Yet another Python textbook Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-21 16:11 -0700
        Re: Yet another Python textbook Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-21 23:26 +0000
        Re: Yet another Python textbook Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-11-21 23:32 +0000
        Re: Yet another Python textbook Ian Kelly <ian.g.kelly@gmail.com> - 2012-11-21 17:19 -0700
        Re: Yet another Python textbook Terry Reedy <tjreedy@udel.edu> - 2012-11-21 23:04 -0500
    Re: Yet another Python textbook Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-11-20 21:55 +0000
    Re: Yet another Python textbook Chris Angelico <rosuav@gmail.com> - 2012-11-21 09:25 +1100

csiph-web