Re: [Python-Dev] Python 3.0 blocks?

2005-08-28 Thread François Pinard
[Guido van Rossum]
 [Aahz]

  IIRC, one of your proposals for Python 3.0 was that single-line
  blocks would be banned.  Is my memory wrong?

 It's a proposal. I'm on the fence about it.

A difficult decision indeed.  Most single line blocks I've seen would be
more legible if they were written with two lines each, so I'm carefully
avoiding them as a personal rule.

But each rule has exceptions.  There are a few rare cases, usually
sequences of repetitive code, where single line blocks well succeed in
stressing both the repetitive structure and the differences, making the
code more legible then.

As someone well put it already, this is all about Python helping good
coders at writing good code, against Python preventing bad coders from
writing bad code.  Sadly enough, looking around, it seems Python could
be a bit more aggressive against bad practices in this particular case,
even if this might hurt good coders once in a while.  But I'm not sure!

-- 
François Pinard   http://pinard.progiciels-bpi.ca
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python 3.0 blocks?

2005-08-27 Thread Guido van Rossum
On 8/27/05, Aahz [EMAIL PROTECTED] wrote:
 On Sat, Aug 27, 2005, Guido van Rossum wrote:
 
  if vi in ('=',':'):
try: pos = optval.index(';')
except ValueError: pass
else:
  if pos  0 and optval[pos-1].isspace():
optval = optval[:pos]
 
 IIRC, one of your proposals for Python 3.0 was that single-line blocks
 would be banned.  Is my memory wrong?

It's a proposal. I'm on the fence about it. I was just trying to get
the posting out quick before my family came knowcking on my door. :)

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com