a comment about PEPs

phil hunt philh at comuno.freeserve.co.uk
Mon Dec 3 13:20:18 EST 2001


On Sun, 2 Dec 2001 21:01:50 -0700, Andrew Dalke <dalke at dalkescientific.com> wrote:
>phil hunt:
>>Whenever I have a peek at c.l.p, there are usually several threads going
>>suggesting improvements to the langauge.
>>
>>Why is this?
>
>Here's a few I've seen.
>
> - Python isn't perfect 

True, butr it's better than most

>(type/class dichotomy, rich comparisons)
>
> - There are bugs in the C implementation (xrange, list.append)

Bugs need to be fixed. PEPs aren't necessary to do this.

> - Some other languages have neat features which people miss when
>    they switch to Python (nested static scopes, lazy iterators)

What's the benefit of nested static scopes?

As to lazy iterators, can't python do this already? Or does "lazy iterator"
mean something I don't know of.

> - People don't know the history of a thread, and keep reviving it
>    OVER AND OVER AND OVER AND OVER (eg, using something other than
>    indentation for scope)

True.

> - Some think that needs of a small domain are needs of a general
>    programming language (switch statements are useful for state
>    machines, but are they useful for Python?; if cgi.py is imported
>    then the traceback display hook should display output to HTML)

My understandin is that ouytput goes to stdout or stderr, both of
which can be redirected by the programmer. It therefore doesn't
need a change to the langauge to make cgi.py output error messages
to the HTML page being rendered.

> - Others don't realize a specific need can be done in other ways
>    (Java-style interfaces)

Just use classes.

> - With extra hints provided by the language, different
>    implementations could work better (explicit type declarations
>    can help a hypothetical Python compiler produce machine code)

True, but a better solution might be to have an interpreter
that remembers what actual classes are used when a function is called,
and passes that information to a Self-like compiler which uses it for
optimisation.

-- 
*** Philip Hunt *** philh at comuno.freeserve.co.uk ***




More information about the Python-list mailing list