I strongly dislike Python 3

geremy condra debatem1 at gmail.com
Wed Jun 30 22:50:43 EDT 2010


On Wed, Jun 30, 2010 at 10:06 PM, Steven D'Aprano
<steve-REMOVE-THIS at cybersource.com.au> wrote:
> On Wed, 30 Jun 2010 18:57:58 -0400, geremy condra wrote:
>
>>>> 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?
> [...]
>>> 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.
>
> You're correct, I didn't think that's what *you* were advocating, and I'm
> sorry if that's the impression I gave. I agreed with you that typing
> "print space args" is easier than "print left-paren args right-parens",
> but then took that micro-optimization to its (il)logical conclusion, and
> demonstrated that trying to minimize typing effort is a mug's game. You
> might call it a strawman, but I prefer to call it reductio ad absurdum.
>
> (That's not to say that we should *maximize* typing either.)

Fair enough.

> Consistency, expressiveness, readability and re-usability are at least as
> important as minimizing typing, and probably more so. The micro-cost of
> typing print-as-a-function over print-as-a-statement is, I believe, far
> outweighed by the other advantages.

Personally I don't use print often enough to either be a significant victim
of its the change or to take substantial advantage of it, but it is jarring
enough that it annoys, which is pretty much all I was saying.

> But like all optimizations, measure measure measure. If it turns out that
> adding parentheses to print really does add a significant drain on
> programmer productivity, then removing them again would no longer be a
> premature micro-optimization but an actual optimization.
>
> But, honestly, is there anyone here, even the most heavy users of print,
> who would seriously expect that adding parentheses to print calls will do
> more than add a tiny fraction to the amount of typing effort already
> required to use Python? I suppose in principle those extra three key
> presses (shift-9 shift-0 vs space) could be the straw that breaks the
> camel's back, but I doubt it.

It certainly wasn't for me. I'm probably one of the very few people who
is currently paid to write pure python3 and I'm fairly confident that print
could have been entirely removed without greatly changing the fact that
I prefer it. Having said that, I do occasionally find myself cursing at the
command prompt over it.

Geremy Condra



More information about the Python-list mailing list