gratuitous new features in 2.0

Alex Martelli alex at magenta.com
Mon Aug 28 14:45:21 EDT 2000


"Keith Ray" <k_j_r_a_y at ix.netcom.com> wrote in message
news:k_j_r_a_y-68E378.09043128082000 at nntp.ix.netcom.com...
    [snip]
> >Practicality dictates not breaking good working code.  Python has
    [snip]
> What if 'print' and 'printto' were not treated as language keywords,
> but as global identifiers, which could be overridden by user-defined
> identifiers?

Then the "dont't break working code" mantra would not be relevant.
But, AFAI understand the Python compiler, such "global identifiers"
would only serve for function calls (or methods), not statements.

I'd be delighted to see the print-to-file functionality exposed as a
function rather than a statement.  But, AFAIK, it's just not going to
happen.


Somebody will no doubt wonder how comes that I (and other) are
raising such a ruckus about "print>>file", far more than about other
more massive changes forthcoming in Python 2.0.  There are several
reasons.  In my case, I find most of the proposed changes deep and
difficult to fully grasp -- with pluses and minuses, but, quite likely,
more pluses than minuses.  I'm quite willing to acquiesce in the
BDFL's judgment about such difficult matters, beyond my full grasp.

But "print >> file" is simple enough that I believe I can understand
every implication -- because there aren't all that many; so, I feel
able to come to my own judgment... and find that the core language
is being changed (in a syntactically dubious and unpleasant way) to
expose a functionality which could perfectly well (indeed better)
exposed as a function instead.  As the issue is simple enough for
me to feel that I grasp its implications, I feel empowered to speak
out on the subject.

In a way, it's a manifestation of one of "Parkinson's Laws" -- the
committee time devoted to an issue being in inverse proportion to
its actual depth and importance.

Maybe list comprehensions, Unicode support, range literals, or
augmented assignments, are ill-conceived; I doubt so, they seem
very well designed to me, and I don't consider that I have grasped
all the implications pro and con, anyway -- so, I'm not going to
advance my personal judgment.  OTOH, 'print>>file' is a wart --
and moreover, a simple enough one that even I can see that.  So,
I express my opinions in the matter -- just as, I suspect, are most
others doing.

Parkinson, no doubt, is meanwhile laughing from Empyreon...:-).


Alex






More information about the Python-list mailing list