Python evolution: Unease

Doug Holton a at b.c
Tue Jan 4 11:10:00 EST 2005


Istvan Albert wrote:
> But if python
> were to become overly complicated I'll find something else.
> Three years ago I have not not used python at all, now I'm
> using it for everything.

You're in luck, python 2.4 won't be significantly changing anytime soon.

> PS. why can't decorators solve this optional type checking
> problem? I clearly remember this as being one of the
> selling points for having decorators in the first place...

Because they are quite obviously an ugly and overly complicated 
solution.  Even Guido understood this:
http://mail.python.org/pipermail/python-dev/2004-September/048518.html

"A warning: some people have shown examples of extreme uses of
decorators. I've seen decorators proposed for argument and return type
annotations, and even one that used a decorator to create an object
that did a regular expression substitution. Those uses are cute, but I
recommend being conservative when deciding between using a decorator
or some other approach, especially in code that will see a large
audience (like 3rd party library packages). Using decorators for type
annotations in particular looks tedious, and this particular
application is so important that I expect Python 3000 will have
optional type declarations integrated into the argument list."



More information about the Python-list mailing list