November 22, 2007

1 article; also check out the month of November or even the whole year.

Dynamic Functions

Python supports a neat little trick that I had never heard of before I delved into the Django source. I doubt its usage is really all that rare, but I started Python because of Django, so that was naturally my first exposure to it. In a nutshell, Python allows you to define and call functions using any number of arguments, and it does in a very clear, concise way. Unfortunately, if you’re not familiar, it only looks concise. It isn’t immediately clear just by looking at the code without documentation.