Python becoming less Lisp-like
bronger at physik.rwth-aachen.de
Tue Mar 15 08:59:04 CET 2005
Steven Bethard <steven.bethard at gmail.com> writes:
> Torsten Bronger wrote:
>> the underlying constructs are utterly ugly, as are some of
>> Python's features (e.g. __getattr__ and such, and decorators, in
>> order to get nice class properties).
> What do you find ugly about __getattr__?
[First, I wanted to say "descriptors" instead of "decorators" (I
superseded my post).]
The goal is to trigger function calls when attributes are accessed.
This is called properties in C# (and maybe in Ruby, too). Python
now also has this concept. What I find ugly is that it is not a
syntax element. It looks artificially added to the language. In
C#, the "set" and "get" methods form with its attribute a syntactic
unity. Everything is together, and no "property" function is
>> I looked for a new language for my hobby programming.
>> I want to go with Python, but you can definitely see that it's
>> the oldest one: Many parts of its syntax are awkward and look
>> like patchwork.
> Interesting. I've never thought that. What parts strike you as
Well, with a little bit of experience in the field of programming
languages, you can see which elements had been added later (ie years
after Python's creation). Properties surely would have looked
*very* different 15 years ago.
There would be keywords for static and class methods, no distinction
between Unicode and non-Unicode, and probably no multiple
inheritance (which seem to have caused a lot of trouble recently),
and no __new__.
At first, I was very pleased by Python's syntax (and still I am).
Then, after two weeks, I learned about descriptors and metaclasses
and such and understood nothing (for the first time in syntax I felt
The reason why I stay with Python is (apart from the indenting
syntax, huge community, and equally huge library) my feeling that
the Python developers what to unify the language, even by dropping
features. The current snapshot is a transitional Python and thus
with some double features. The numerical types and two kinds of
classes are examples. I'm very surprised about this, because Python
is a production language, but I'm happy, too.
Torsten Bronger, aquisgrana, europa vetus
More information about the Python-list