Author Archives: admin

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

django :: media, admin and otherwise

Django’s handling of media files such as images, css, etc. has confused me from the very beginning. I’m not going to claim that I fully understand the full ramifications yet, but at least I got something working… hopefully it’ll be … Continue reading

Posted in django | Leave a comment

Django :: i18n

What’s up with so many languages? E.g. in Switzerland there are four official languages, and in Norway there are two: bokmÃ¥l and nynorsk (details). I’ll be describing what I had to do to get a good user experience with these … Continue reading

Posted in django | 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: [sourcecode language=”Python”] >>> flatten([1,2, [3,4], 5]) [1, 2, 3, … Continue reading

Posted in Python | Leave a comment