From: Steven D'Aprano on 30 Jun 2010 16:34 On Wed, 30 Jun 2010 22:52:06 +1000, Lie Ryan wrote: > On 06/27/10 11:24, Steven D'Aprano wrote: >>> > Producing print function takes a little bit more effort than >>> > producing a print statement. >> >> (1) The main use-cases for print are quick (and usually dirty) scripts, >> interactive use, and as a debugging aid. > > That is precisely how the quick-and-dirty syntax of print statement can > be justified. While debugging, you'll need to be able to quickly add and > delete prints here and there, and the extra parens can quickly become > irritating. *rolls eyes* Not as irritating as people who complain about having to type parentheses. -- Steven
From: geremy condra on 30 Jun 2010 17:21 On Wed, Jun 30, 2010 at 4:34 PM, Steven D'Aprano <steve(a)remove-this-cybersource.com.au> wrote: > On Wed, 30 Jun 2010 22:52:06 +1000, Lie Ryan wrote: > >> On 06/27/10 11:24, Steven D'Aprano wrote: >>>> > Producing print function takes a little bit more effort than >>>> > producing a print statement. >>> >>> (1) The main use-cases for print are quick (and usually dirty) scripts, >>> interactive use, and as a debugging aid. >> >> That is precisely how the quick-and-dirty syntax of print statement can >> be justified. While debugging, you'll need to be able to quickly add and >> delete prints here and there, and the extra parens can quickly become >> irritating. > > *rolls eyes* > > Not as irritating as people who complain about having to type parentheses. http://www.xkcd.net/297/ Actually, I agree with this complaint though- it is much easier to type spaces than parens. Geremy Condra
From: Steven D'Aprano on 30 Jun 2010 18:30 On Wed, 30 Jun 2010 17:21:32 -0400, geremy condra wrote: > On Wed, Jun 30, 2010 at 4:34 PM, Steven D'Aprano > <steve(a)remove-this-cybersource.com.au> wrote: >> On Wed, 30 Jun 2010 22:52:06 +1000, Lie Ryan wrote: >> >>> On 06/27/10 11:24, Steven D'Aprano wrote: >>>>> > Producing print function takes a little bit more effort than >>>>> > producing a print statement. >>>> >>>> (1) The main use-cases for print are quick (and usually dirty) >>>> scripts, interactive use, and as a debugging aid. >>> >>> That is precisely how the quick-and-dirty syntax of print statement >>> can be justified. While debugging, you'll need to be able to quickly >>> add and delete prints here and there, and the extra parens can quickly >>> become irritating. >> >> *rolls eyes* >> >> Not as irritating as people who complain about having to type >> parentheses. > > http://www.xkcd.net/297/ > > Actually, I agree with this complaint though- it is much easier to type > spaces than parens. Yes. And typing "p" is easier than typing "print". Perhaps we should replace all Python built-ins with one letter names so that we can *really* optimize our typing effort? i m d sin2pi(x): r m.s(x*2*m.p) f n == '__main__': p "Sine of 1.3*2*pi is," sin2pi(1.3) Perhaps not. The rule against premature optimization doesn't just apply to *code*. -- Steven
From: geremy condra on 30 Jun 2010 18:57 On Wed, Jun 30, 2010 at 6:30 PM, Steven D'Aprano <steve-REMOVE-THIS(a)cybersource.com.au> wrote: > On Wed, 30 Jun 2010 17:21:32 -0400, geremy condra wrote: > >> On Wed, Jun 30, 2010 at 4:34 PM, Steven D'Aprano >> <steve(a)remove-this-cybersource.com.au> wrote: >>> On Wed, 30 Jun 2010 22:52:06 +1000, Lie Ryan wrote: >>> >>>> On 06/27/10 11:24, Steven D'Aprano wrote: >>>>>> > Producing print function takes a little bit more effort than >>>>>> > producing a print statement. >>>>> >>>>> (1) The main use-cases for print are quick (and usually dirty) >>>>> scripts, interactive use, and as a debugging aid. >>>> >>>> That is precisely how the quick-and-dirty syntax of print statement >>>> can be justified. While debugging, you'll need to be able to quickly >>>> add and delete prints here and there, and the extra parens can quickly >>>> become irritating. >>> >>> *rolls eyes* >>> >>> Not as irritating as people who complain about having to type >>> parentheses. >> >> http://www.xkcd.net/297/ >> >> Actually, I agree with this complaint though- it is much easier to type >> spaces than parens. > > Yes. And typing "p" is easier than typing "print". Perhaps we should > replace all Python built-ins with one letter names so that we can > *really* optimize our typing effort? > > i m > d sin2pi(x): > r m.s(x*2*m.p) > > f n == '__main__': > p "Sine of 1.3*2*pi is," sin2pi(1.3) > > > Perhaps not. > > The rule against premature optimization doesn't just apply to *code*. Hypocrite. You just took Jorgen Grahn to task in another thread for slaying exactly this kind of strawman. You're too smart to think that this is what I was advocating. Geremy Condra
From: Mark Lawrence on 30 Jun 2010 19:03
On 30/06/2010 23:30, Steven D'Aprano wrote: [snips] > The rule against premature optimization doesn't just apply to *code*. > +1QOTW Kindest regards. Mark Lawrence. |