[Python-3000] Proposed changes to PEP3101 advanced string formatting -- please discuss and vote! (original) (raw)
Patrick Maupin pmaupin at gmail.com
Wed Mar 14 19:37:43 CET 2007
- Previous message: [Python-3000] New I/O PEP to Subversion
- Next message: [Python-3000] Fwd: Re: Octal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 3/14/07, Paul Moore <p.f.moore at gmail.com> wrote:
On 14/03/07, Josiah Carlson <jcarlson at uci.edu> wrote:
FWIW, I tend to agree with most of Josiah's responses. In particular, I'm afraid I hate the whitespace-sensitive alternative syntax. %...% syntax would be a reasonable alternative for Windows users, but I take your point that % is already magical. I'd stick with {foo} and ${foo} (would you expect to allow the normal shortcut of $foo where foo is in the form of a simple identifier?)
I originally wasn't going to support $foo, but when it was mentioned to me earlier (being a congenial sort of guy) I decided to put it in (it's in one version of the documentation checked into subversion), but after thinking about it some more I decided against it. I'm not really that big on saving keystrokes, and to me, $foo instead of ${foo} is a significant impairment to readability because there is more than one way to do it within the same format string. (It also drives complexity into the documentation and into the parser -- the rules about when you need {} and when you don't can get complicated.)
I get the impression you are close to having a publishable implementation - I'd say, get it released and get some feedback from real use. (If it's portable to 2.5, or even older versions, that is). You can mark it as alpha and explicitly note that some design issues still remain to be resolved.
Yeah, it works pretty well, so after incorporating changes from this round of feedback, I think that's probably a pretty good plan. (Anybody who doesn't mind the occasional arrow in their back can already download and play with it. It's under sandbox/trunk/pep3101.)
Thanks, Pat
- Previous message: [Python-3000] New I/O PEP to Subversion
- Next message: [Python-3000] Fwd: Re: Octal
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]