[XML-SIG] foo.bar vs. foo.get_bar()
Christian Tismer
tismer@appliedbiometrics.com
Tue, 09 Nov 1999 18:54:42 +0100
uche.ogbuji@fourthought.com wrote:
...
> Like everyone else, though, I'm coming around to Paul's view that Python needs
> efficiently-implemented attributes-with-behavior.
Well, did anybody deal with Jim Fulton's ExtensionClass already?
I just did it for a larger project, and it is quite impressive.
What I get is:
- types which behave like classes
- attribute access at raw C speed
- computed attributes without the usual get/setattr hassles.
This means that for true attributes, access speed is by no means
lowered. Attributes are first looked up in the implemented C
get/setattr.
Then, a class-like attribute lookup is done, and you get class
behavior.
> Petitions to Guido, anyone? In the unlikely event that I have some free time
> in the near future, I might look into a demo patch.
Please have a look into ExtensionClass if that might be what you
need. I admit that this stuff is not easy to understand, but
I have been working through that for the last four weeks while
implementing Python C++ wrappers in a commercial project, so feel
free to ask me how it works.
ciao - chris
--
Christian Tismer :^) <mailto:tismer@appliedbiometrics.com>
Applied Biometrics GmbH : Have a break! Take a ride on Python's
Kaiserin-Augusta-Allee 101 : *Starship* http://starship.python.net
10553 Berlin : PGP key -> http://wwwkeys.pgp.net
PGP Fingerprint E182 71C7 1A9D 66E9 9D15 D3CC D4D7 93E2 1FAE F6DF
we're tired of banana software - shipped green, ripens at home