Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #12707 > unrolled thread

Re: [Python-ideas] allow line break at operators

Started byStephen Hansen <me+list/python@ixokai.io>
First post2011-09-03 09:50 -0700
Last post2011-09-04 09:37 -0700
Articles 2 — 2 participants

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [Python-ideas] allow line break at operators Stephen Hansen <me+list/python@ixokai.io> - 2011-09-03 09:50 -0700
    Re: allow line break at operators rantingrick <rantingrick@gmail.com> - 2011-09-04 09:37 -0700

#12707 — Re: [Python-ideas] allow line break at operators

FromStephen Hansen <me+list/python@ixokai.io>
Date2011-09-03 09:50 -0700
SubjectRe: [Python-ideas] allow line break at operators
Message-ID<mailman.737.1315068637.27778.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

On 9/3/11 3:33 AM, Yingjie Lan wrote:
> but at least we can have such 'freedom' :)

Freedom is not and never has been, IMHO, a virtue or goal or even desire
in Python. Where it occurs, it is at best a happy coincidence, and even
if that happy coincidence happens often, it is not a design feature, IMHO.

Simplicity and readability are virtues in Python. Freedom is even
declared a vice to be avoided by the Zen, that holy document which
defines all things Pythonic in clear and unambiguously absolute terms*.

Looking over this whole thread at the various examples -- they add
complication (a vice!). Complication to the parser, complication to the
language itself and worse, understanding of code (as your head has to
parse things too), all for what?

So you don't have to use parens, which quite explicitly (another
virtue!) do the job, to wrap around a long expression? Escaping newlines
is arguably a bit on the ugly side (a vice!), so maybe the proposal has
a little weight there, but since you can just avoid that by using
parens, that's pretty much nullified. (Since it is also a virtue to
offer only the Dutch way of doing things -- at least without hiding the
alternatives in modules with a little bit of shame -- and this is
clearly a case of the Dutch liking limited use of grouping parens).

There just isn't even vaguely enough justification based on
Python-virtues (readability, simplicity, explicitness, things like that)
to even kind of make it worth the complication.

-- 

   Stephen Hansen
   ... Also: Ixokai
   ... Mail: me+list/python (AT) ixokai (DOT) io
   ... Blog: http://meh.ixokai.io/

* Obvious exaggeration :P

[toc] | [next] | [standalone]


#12742 — Re: allow line break at operators

Fromrantingrick <rantingrick@gmail.com>
Date2011-09-04 09:37 -0700
SubjectRe: allow line break at operators
Message-ID<b7d647f1-901b-4ab9-8fe1-eab1a3dae140@u6g2000yqa.googlegroups.com>
In reply to#12707
On Sep 3, 11:50 am, Stephen Hansen <me+list/pyt...@ixokai.io> wrote:

> Freedom is not and never has been, IMHO, a virtue or goal or even desire
> in Python.

Exactly!

> Where it occurs, it is at best a happy coincidence,

Exactly!

> and even
> if that happy coincidence happens often, it is not a design feature, IMHO.

Exactly! Actually i believe Python allows TOO many freedoms and
indulges TOO many excesses to the detriment of our code bases. Take
the fact that both tabs AND spaces are legal in Python source. We
should have choose one over the other!

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web