Ted Leung on the air
Ted Leung on the air: Open Source, Java, Python, and ...
Ted Leung on the air: Open Source, Java, Python, and ...
Mon, 17 Mar 2003
Well color me a python newbie
Will Guaraldi, one of the pyblosxom developers, mailed to bring me up to date. It turns out that Skip Montanaro's Python Performance Tips only covers up to Python 2.0 and doesn't account for the changes in Pyhon 2.1, 2.2, and 2.3 which apparently are substatial. It's a shame that there's not a more up to date version of this document. It would be great to have this kind of information in one place. I guess I'll have to go read the 2.1, 2.2 and 2.3 release notes and lurk in comp.lang.python or the python-dev list. If anyone else has Python performance tips that are more up to date, I'd love to see them.
The second inaccuracy that Will pointed out is that we're actually not subclassing dicts in PyBlosxom, we're just overriding the
[11:17] |
[computers/programming/python] |
# |
TB |
F |
G |
0 Comments |
__getattr__
and __setattr__
methods on classes. We had a dicussion about subclassing dicts, but this only works in Python 2.2, so we ended up not doing that. The result is that the classes in question behave like dicts (you can do things like config['num_comments']
) and the "dict lookups" can do lazy evaluation, which is the thing that I really liked.
You can subscribe to an RSS feed of the comments for this blog:
Add a comment here:
You can use some HTML tags in the comment text:
To insert a URI, just type it -- no need to write an anchor tag.
Allowable html tags are:
You can also use some Wiki style:
URI => [uri title]
<em> => _emphasized text_
<b> => *bold text*
Ordered list => consecutive lines starting spaces and an asterisk
To insert a URI, just type it -- no need to write an anchor tag.
Allowable html tags are:
<a href>
, <em>
, <i>
, <b>
, <blockquote>
, <br/>
, <p>
, <code>
, <pre>
, <cite>
, <sub>
and <sup>
.You can also use some Wiki style:
URI => [uri title]
<em> => _emphasized text_
<b> => *bold text*
Ordered list => consecutive lines starting spaces and an asterisk