-
Recent Posts
Recent Comments
Archives
Categories
Meta
Category Archives: Python
python :: Calculating the distance between two locations…
How far is it from point a to point b? There are complicated ways to answer this question, that e.g. takes into account whether you’re walking or driving etc. However, if you only need the approximate distance “as the crow … Continue reading
Posted in Python
Leave a comment
emacs :: autocompletion and code-commenting
I’m a believing member in the church of emacs, and in honor of the new release I went looking for solutions to a couple of outstanding issues I’ve had with my emacs installation. Today’s first emacs find is M-; which, … Continue reading
Posted in emacs, Python
Leave a comment
Python :: property set
It looks like Python is getting tuples with named members in 2.6 (http://www.oluyede.org/blog/2007/03/11/updates-from-python-svn-part-2/ and http://docs.python.org/dev/lib/named-tuple-factory.html). I suspect many of us have implemented similar functionality ourselves, e.g. Shannon -jj Behrens describes how he sometimes uses dictionaries to return composite polymorphic values … Continue reading
Posted in Python
Leave a comment
Python :: flatten
Although it can seem like a CS excercise, everyone will sooner or later have to write a “flatten” function — a function that takes a nested “list” and makes it one-dimensional: it should also handle Python data types in a … Continue reading
Posted in Python
Leave a comment