Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-26 Thread Joao S. O. Bueno
On 24 February 2012 22:20, wrote: > I find the .format syntax too complicated and difficult to learn. It has > so many bells and whistles, making it more than just a *mini* language. > So for my own code, I always prefer % formatting for simplicity. > > +1 > Regards, > Martin > ___

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-26 Thread Matt Joiner
Big +1 On Feb 26, 2012 4:41 PM, "Eli Bendersky" wrote: > > On Sat, Feb 25, 2012 at 12:20, "Martin v. Löwis" wrote: > >> > I find that strange, especially for an expert Python dev. I, a newbie, >> > find it far friendlier (and easier for a new programmer to grasp). >> > Maybe it's because I use it

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-26 Thread Eli Bendersky
> Indeed, that note was written before we decided that getting rid of > "%" formatting altogether would be a bad idea. > > It would be better to update it to say something like: > > "The formatting operations described here are modelled on C's printf() > syntax. They only support formatting of cert

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-26 Thread Eli Bendersky
On Sat, Feb 25, 2012 at 12:20, "Martin v. Löwis" wrote: > > I find that strange, especially for an expert Python dev. I, a newbie, > > find it far friendlier (and easier for a new programmer to grasp). > > Maybe it's because I use it all the time, and you don't? > > That is most likely the case.

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-25 Thread Mark Lawrence
On 25/02/2012 20:16, Mark Lawrence wrote: On 25/02/2012 13:13, Mark Lawrence wrote: On 25/02/2012 05:55, Nick Coghlan wrote: On Sat, Feb 25, 2012 at 10:23 AM, Mark Lawrence wrote: Quoting the docs http://docs.python.org/py3k/library/stdtypes.html 4.6.2. Old String Formatting Operations Not

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-25 Thread Mark Lawrence
On 25/02/2012 13:13, Mark Lawrence wrote: On 25/02/2012 05:55, Nick Coghlan wrote: On Sat, Feb 25, 2012 at 10:23 AM, Mark Lawrence wrote: Quoting the docs http://docs.python.org/py3k/library/stdtypes.html 4.6.2. Old String Formatting Operations Note The formatting operations described here

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-25 Thread Mark Lawrence
On 25/02/2012 05:55, Nick Coghlan wrote: On Sat, Feb 25, 2012 at 10:23 AM, Mark Lawrence wrote: Quoting the docs http://docs.python.org/py3k/library/stdtypes.html 4.6.2. Old String Formatting Operations Note The formatting operations described here are obsolete and may go away in future ve

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-25 Thread Tshepang Lekhonkhobe
On Sat, Feb 25, 2012 at 12:20, "Martin v. Löwis" wrote: >> I find that strange, especially for an expert Python dev. I, a newbie, >> find it far friendlier (and easier for a new programmer to grasp). >> Maybe it's because I use it all the time, and you don't? > > That is most likely the case. You

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-25 Thread INADA Naoki
I don't feel "similar to other language" is not enough reason for builtins violates the Zen. Violating the Zen by standard library like `getopt` for compatibility to other language or API is good. So, I prefer moving %-style format from builtin str to function in string module in Python 4. On Sat

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-25 Thread Martin v. Löwis
> I find that strange, especially for an expert Python dev. I, a newbie, > find it far friendlier (and easier for a new programmer to grasp). > Maybe it's because I use it all the time, and you don't? That is most likely the case. You learn by practice. For that very reason, the claim "and easier

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-25 Thread Steven D'Aprano
Tshepang Lekhonkhobe wrote: On Sat, Feb 25, 2012 at 05:10, Ned Batchelder wrote: Has Python *ever* removed a feature except in X.0 releases? I thought this happens all the time, but with deprecations first. Is that not the case? Hardly "all the time". Only when absolutely necessary, the ex

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-25 Thread Tshepang Lekhonkhobe
On Sat, Feb 25, 2012 at 02:20, wrote: > Zitat von Tshepang Lekhonkhobe : >> On Fri, Feb 24, 2012 at 23:39, "Martin v. Löwis" >>> If that issue was getting serious, I would prefer if the .format method >>> was deprecated, and only % formatting was kept. >> >> Why is that? Isn't .format regarded s

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-25 Thread Tshepang Lekhonkhobe
On Sat, Feb 25, 2012 at 05:10, Ned Batchelder wrote: >  Has Python *ever* removed a feature except in X.0 releases? I thought this happens all the time, but with deprecations first. Is that not the case? ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Nick Coghlan
On Sat, Feb 25, 2012 at 10:20 AM, wrote: > I find the .format syntax too complicated and difficult to learn. It has > so many bells and whistles, making it more than just a *mini* language. > So for my own code, I always prefer % formatting for simplicity. Heh, I've switched almost entirely to .

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Nick Coghlan
On Sat, Feb 25, 2012 at 10:23 AM, Mark Lawrence wrote: > > Quoting the docs http://docs.python.org/py3k/library/stdtypes.html > > 4.6.2. Old String Formatting Operations > > Note > > The formatting operations described here are obsolete and may go away in > future versions of Python. Use the new

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Ned Batchelder
On 2/24/2012 7:23 PM, Mark Lawrence wrote: I think this is daft because all of the code has to be supported for the ten years that MVL has suggested. I suggest a plan that says something like:- Until Python 3.5 both methods of string formatting will be supported. In Python 3.6 the the old for

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Brian Curtin
On Feb 24, 2012 6:26 PM, "Mark Lawrence" wrote: > > On 24/02/2012 21:37, "Martin v. Löwis" wrote: >>> >>> I was of the thought that Old String Formatting |"%s" % foo| was to be >>> phased out by Advanced String Formatting |"{}.format(foo)|. >> >> >> This is actually not the case, and never was. So

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Mark Lawrence
On 24/02/2012 21:37, "Martin v. Löwis" wrote: I was of the thought that Old String Formatting |"%s" % foo| was to be phased out by Advanced String Formatting |"{}.format(foo)|. This is actually not the case, and never was. Some people would indeed like to see that happen, and others are strongl

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread martin
Zitat von Tshepang Lekhonkhobe : On Fri, Feb 24, 2012 at 23:39, "Martin v. Löwis" wrote: It is a burden for some people to learn and remember the exact details of both systems and exactly how they differ. Having both in the stdlib hurts readability for such people. I would prefer that the std

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Barry Warsaw
On Feb 24, 2012, at 10:39 PM, Martin v. Löwis wrote: >> It is a burden for some people to learn and remember the exact details >> of both systems and exactly how they differ. Having both in the stdlib >> hurts readability for such people. I would prefer that the stdlib only >> used {} formatting o

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Gregory P. Smith
On Fri, Feb 24, 2012 at 1:52 PM, Tshepang Lekhonkhobe wrote: > On Fri, Feb 24, 2012 at 23:39, "Martin v. Löwis" wrote: >>> It is a burden for some people to learn and remember the exact details >>> of both systems and exactly how they differ. Having both in the stdlib >>> hurts readability for su

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Tshepang Lekhonkhobe
On Fri, Feb 24, 2012 at 23:39, "Martin v. Löwis" wrote: >> It is a burden for some people to learn and remember the exact details >> of both systems and exactly how they differ. Having both in the stdlib >> hurts readability for such people. I would prefer that the stdlib only >> used {} formattin

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Martin v. Löwis
> I was of the thought that Old String Formatting |"%s" % foo| was to be > phased out by Advanced String Formatting |"{}.format(foo)|. This is actually not the case, and never was. Some people would indeed like to see that happen, and others are strongly opposed. As a consequence, both APIs for f

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Martin v. Löwis
> It is a burden for some people to learn and remember the exact details > of both systems and exactly how they differ. Having both in the stdlib > hurts readability for such people. I would prefer that the stdlib only > used {} formatting or if not that, that it only used the simple, > hard-to-for

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Terry Reedy
On 2/24/2012 11:41 AM, Benjamin Peterson wrote: 2012/2/24 Tshepang Lekhonkhobe: Hi, I was of the thought that Old String Formatting |"%s" % foo| was to be phased out by Advanced String Formatting |"{}.format(foo)|. I however keep seeing new code committed into the main VCS using the old style.

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Ethan Furman
Tshepang Lekhonkhobe wrote: Hi, I was of the thought that Old String Formatting |"%s" % foo| was to be phased out by Advanced String Formatting |"{}.format(foo)|. I however keep seeing new code committed into the main VCS using the old style. Is this okay? Is there a policy? I ask also because I

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Nick Coghlan
On Sat, Feb 25, 2012 at 2:41 AM, Benjamin Peterson wrote: > 2012/2/24 Tshepang Lekhonkhobe : >> Hi, >> >> I was of the thought that Old String Formatting |"%s" % foo| was to be >> phased out by Advanced String Formatting |"{}.format(foo)|. I however >> keep seeing new code committed into the main

Re: [Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Benjamin Peterson
2012/2/24 Tshepang Lekhonkhobe : > Hi, > > I was of the thought that Old String Formatting |"%s" % foo| was to be > phased out by Advanced String Formatting |"{}.format(foo)|. I however > keep seeing new code committed into the main VCS using the old style. > Is this okay? Is there a policy? I ask

[Python-Dev] Status regarding Old vs. Advanced String Formating

2012-02-24 Thread Tshepang Lekhonkhobe
Hi, I was of the thought that Old String Formatting |"%s" % foo| was to be phased out by Advanced String Formatting |"{}.format(foo)|. I however keep seeing new code committed into the main VCS using the old style. Is this okay? Is there a policy? I ask also because I expect CPython to lead by exa