Movatterモバイル変換
[0]ホーム
[Python-Dev] Python 3.0 blocks?
François Pinardpinard at iro.umontreal.ca
Sun Aug 28 14:21:05 CEST 2005
[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 bemore legible if they were written with two lines each, so I'm carefullyavoiding them as a personal rule.But each rule has exceptions. There are a few rare cases, usuallysequences of repetitive code, where single line blocks well succeed instressing both the repetitive structure and the differences, making thecode more legible then.As someone well put it already, this is all about Python helping goodcoders at writing good code, against Python preventing bad coders fromwriting bad code. Sadly enough, looking around, it seems Python couldbe 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 Pinardhttp://pinard.progiciels-bpi.ca
More information about the Python-Devmailing list
[8]ページ先頭