From: Stephen Hansen on 30 Jun 2010 11:30 On 6/30/10 5:52 AM, 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. I want to stamp a [Citation Needed] claim on that :) Considering all the other things you're likely to do during 'quick and dirty' debugging, an extra set of parens seems terribly unlikely to really be any kind of issue. And if you have an editor worth its salt, it'll take care of a lot of that anyways. That justification sounds like its based on a mountain-out-of-a-mole-hill complaint: print() is really not that significantly more difficult then the print statement. This isn't Ruby or another language which has determined () is an onerous requirement for executing something. -- ... Stephen Hansen ... Also: Ixokai ... Mail: me+list/python (AT) ixokai (DOT) io ... Blog: http://meh.ixokai.io/
From: Michele Simionato on 30 Jun 2010 11:42 On Jun 30, 2:52 pm, Lie Ryan <lie.1...(a)gmail.com> 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. Actually when debugging I use pdb which uses "p" (no parens) for printing, so having print or print() would not make any difference for me.
From: Lie Ryan on 30 Jun 2010 12:22 On 07/01/10 01:30, Stephen Hansen wrote: > On 6/30/10 5:52 AM, 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. > > I want to stamp a [Citation Needed] claim on that :) That's based on my own anecdotal experience. > Considering all the other things you're likely to do during 'quick and > dirty' debugging, an extra set of parens seems terribly unlikely to > really be any kind of issue. You want to focus on doing these "other things you're likely to do" instead of having to do the function call keyboard dance. > That justification sounds like its based on a > mountain-out-of-a-mole-hill complaint: print() is really not that > significantly more difficult then the print statement. indeed it isn't a major irritant; but it *is* irritating.
From: Lie Ryan on 30 Jun 2010 12:23 On 07/01/10 01:42, Michele Simionato wrote: > On Jun 30, 2:52 pm, Lie Ryan <lie.1...(a)gmail.com> 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. > > Actually when debugging I use pdb which uses "p" (no parens) for > printing, so having > print or print() would not make any difference for me. You mean I have to start a full-blown debugger to figure out the value of a variable? No thanks, debugger has its use for stepping through program, but not when printing values is sufficient.
From: Stephen Hansen on 30 Jun 2010 13:32
On 6/30/10 9:22 AM, Lie Ryan wrote: > On 07/01/10 01:30, Stephen Hansen wrote: >> On 6/30/10 5:52 AM, 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. >> >> I want to stamp a [Citation Needed] claim on that :) > > That's based on my own anecdotal experience. That was meant as a joke. :) >> Considering all the other things you're likely to do during 'quick and >> dirty' debugging, an extra set of parens seems terribly unlikely to >> really be any kind of issue. > > You want to focus on doing these "other things you're likely to do" > instead of having to do the function call keyboard dance. Function call keyboard dance? Really? >> That justification sounds like its based on a >> mountain-out-of-a-mole-hill complaint: print() is really not that >> significantly more difficult then the print statement. > > indeed it isn't a major irritant; but it *is* irritating. Ooookay. See, if *this* is irritating to you, I just can't fathom how you get through actually coding anything without going postal. I'm just gonna chalk it up to "different strokes" and give up :) -- ... Stephen Hansen ... Also: Ixokai ... Mail: me+list/python (AT) ixokai (DOT) io ... Blog: http://meh.ixokai.io/ |