Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- Multimethod



  Five-minute Multimethods in Python

So what are multimethods? I'll give you my own definition, as I've come to understand them: a function that has multiple versions, distinguished by the type of the arguments. (Some people go beyond this and also allow versions distinguished by the value of the arguments; I'm not addressing this here.) As a very simple example, let's suppose we have a function that we want to define for two ints, two floats, or two strings. Of course, we could define it as follows: def foo(a, b): if...

   Python,Multimethod,Argument list,Version,Overloadding     2011-12-07 08:41:03

  Thoughts on Python 3

I spent the last couple of days thinking about Python 3's current state a lot. While it might not appear to be the case, I do love Python as a language and especially the direction it's heading in. Python has been not only part of my life for the last couple of five years, it has been the largest part by far. Let there be a warning upfront: this is a very personal post. I counted a hundred instances of a certain capital letter in this text. That's because I am very grateful for all the opport...

   Python,Python 3,Feature,Drawback,Embrace     2011-12-07 08:46:47