syntax philosophy

Ville Vainio ville.spammehardvainio at
Thu Nov 20 15:47:16 CET 2003

tuanglen at (Tuang) writes:

> Nice. I like that. It appears that in Python it pays to think at a
> slightly higher level of abstraction than in Perl. Put a little extra
> time into creating a little tool for the job the first time, then
> reuse it the next time. I do that with Perl code snippets, but using
> small classes or functions instead appeals to me.

Yep, w/ Python, if you want magic, you just implement it yourself or
use a premade module that implements the magic. It's all doable, it's
just not the standard, out of the box way. IMO the "convenience"
argument for having the magic built into the language is worthless,
because getting to that magic is easy enough w/ the tools we already
have. doRE("var=~s/hi/hello/i"), anyone? :-)

And having something as an out-of-the-box __builtins__ is still
infinitely preferable to having an implementation of something
intermingled w/ the code generator for the language, even w/ the
minimal sacrifice of performance.

Ville Vainio

More information about the Python-list mailing list