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 ...
Sat, 15 Mar 2003
Squeezed by Python
Working on PyBlosxom has been a great way to learn Python, after years of putting off doing it. I'm really enjoying it quite a bit. Here's a few things that I like
Subclassing the built in Python types is cool. We're subclassing dicts in PyBlosxom and it contributes greatly to the readability of the code
List comprehensions. The notation is exquisitely compact. Unfortunately lambda expressions cannot contain statements, which makes the notation not quite as compact as I would like.
Muliple value return and tuple assignments. Shades of Lisp
The rep loop. I've been working on pingbacks today, and being able to test the code from a Python interpreter is really nice.
Joe Gregario posted a new version of his XMLToDict code that uses SAX and provides filtering. And the total cost of this beauty? 40 lines of Python.
Wheee!
[23:07] |
[computers/programming/python] |
# |
TB |
F |
G |
0 Comments |
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