New PEP: The directive statement

Grant Griffin not.this at seebelow.org
Tue Mar 20 13:46:38 EST 2001


In article <mailman.985107140.4586.python-list at python.org>, Timothy says...
>
>I am not one of the gods of Python,

me neither

>but I'm not Python illiterate either.

me neither

>When I read PEP 236. I cringed.

me too

>I understand the value,

me too

>but the solution seemed far from elegant,

me too

>and in Python, most things seem elegant

me too

>(except for lambda<wink>.

me too

>When I read the below suggestion it made far more sense to me,

me too

>and seemed to be a more elegant solution to the problem.

me too

By "elegant", perhaps you mean that it reads more like what it really is.

>On Tue, Mar 20, 2001 at 11:42:34AM +0100, Martin von Loewis wrote:
>> Please have a look at the PEP below. It is intended to replace the
>> __future__ import suggested in PEP 236.

No kidding, Gang, when I first ran across posts about the __future__ directive,
I thought it was another one of Tim's beloved witicisms.  (That's a polite way
of saying I thought it was a joke. <wink>)  It took me awhile to figure out it
was serious, because it _reads_ like a joke!: "from __future__ import..."

The "directive" thing reads a little drier--but maybe that's the way a
programming language _should_ read.  Also, using "import" for something that
really isn't an import raises our instinctive alarms: programming experience
shows that one should always use a different gizmo to do a different job. 
Specifically, "directive" is less likely to confuse those who run across it and
don't understand it because they will ignore it or look it up, rather than
trying to figure it out.

if-it's-hard-to-explain-it's-a-bad-idea
   --- or --  
from-__future__-import-directive-ly y'rs,

=g2
p.s.  It's nice to run into yet another Grant here. <wink>

_____________________________________________________________________

Grant R. Griffin                                       g2 at dspguru.com
Publisher of dspGuru                           http://www.dspguru.com
Iowegian International Corporation            http://www.iowegian.com




More information about the Python-list mailing list