python3: 'where' keyword

Paul Rubin http
Mon Jan 10 07:44:05 EST 2005

"Carl Banks" <invalidemail at> writes:

> Paul Rubin wrote:
> > "Carl Banks" <invalidemail at> writes:
> > > > So do you approve of the movement to get rid of the print
> statement?
> > >
> > > Any little incremental change in Python you could make by having or
> not
> > > having a print statement would be minor compared to the H-Bomb of
> > > ugliness we'd get if suites of statements were to be allowed inside
> > > Python expressions.  Having or not having a print statement might
> > > violate some small aspect of the Zen, but it won't rape the whole
> list.
> >
> > How about macros?  Some pretty horrible things have been done in C
> > programs with the C preprocessor.  But there's a movememnt afloat to
> > add hygienic macros to Python.  Got any thoughts about that?
> How about this: Why don't you go to a Python prompt, type "import
> this", and read the Zen of Python.  Consider each line, and whether
> adding macros to the language would be going against that line or for
> it.  After you've done that, make an educated guess of what you think
> I'd think about macros, citing various Zens to support your guess.
> Then I'll tell you what my my thoughts about it are.

    The Zen of Python, by Tim Peters

    Beautiful is better than ugly.   => +1 macros 
    Explicit is better than implicit. => +1 macros
    Simple is better than complex.  => +1 macros
    Complex is better than complicated.  => I don't understand this, +0
    Flat is better than nested.  => not sure, +0
    Sparse is better than dense. => +1 macros
    Readability counts. => +1 macros
    Special cases aren't special enough to break the rules. => +1 macros
    Although practicality beats purity. => +1 macros
    Errors should never pass silently. => +1 macros
    Unless explicitly silenced. => +1 macros
    In the face of ambiguity, refuse the temptation to guess. => +1 macros
    There should be one-- and preferably only one --obvious way to do it. => -1
    Although that way may not be obvious at first unless you're Dutch. => ???
    Now is better than never. => +1 macros, let's do it
    Although never is often better than *right* now. => +1 
    If the implementation is hard to explain, it's a bad idea. => unknown, +0
    If the implementation is easy to explain, it may be a good idea. => +0
    Namespaces are one honking great idea -- let's do more of those! => +1

I'm -1 on doing stuff by received dogma, but in this particular case
it looks to me like the dogma is +12 for macros.  What are your thoughts?

More information about the Python-list mailing list