KBD

Keith Devens .com

Thursday, January 8, 2009 Flag waving
Well, "actual" compliance means bug-free. That's hard to assure in a system of the size of a CL.... – Kent M. Pitman
← Google likes me better nowMaps of Iraq →

Daily link icon Friday, March 21, 2003

Generalizing polymorphism with multimethods

Via Matt, IBM developerWorks: Charming Python: Multiple dispatch, "Generalizing polymorphism with multimethods".

Object-oriented programming gains much of its versatility through polymorphism: objects of different kinds can behave in similar ways, given the right contexts. But most OOP programming is single dispatch; that is, just one designated object determines which code path is taken. Conceptually, a more general technique is to allow all the arguments to a function/method to determine its specialization. This article presents an implementation of multiple dispatch in Python, and shows examples where this makes for better programs.

If there's anything more that'll help me understand multiple dispatch, this article will be it.

← Google likes me better nowMaps of Iraq →

Comments XML gif


Feel free to post a comment below. Please see my comment policy.

Formatting Rules (No HTML):

  • **bold**, *italic*, _underlined_, --strikeout--
  • "text"="url" creates a link, and URLs are auto-highlighted
  • Blockquote: Like e-mail, begin paragraph with > (greater-than sign)
  • Lists: begin paragraph with *,-, or + (unordered), or # (ordered)
  • Code block: ?!code:language=perl|php|sql|javascript|etc.{\n}...{\n}?!/code

:
(will be your IP address if blank)
: (optional)
(Will not be shown on site)

: (optional)
:

January 2009
SunMonTueWedThuFriSat
 123
45678910
11121314151617
18192021222324
25262728293031



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 4 posts

Recent comments XML

new⇒The Elegant Universe

Well I have finally found the crazy​guy that preaches useless nonsence​in A...

Joseph Baxter: Jan 7, 11:07pm

I hate Norton Antivirus


SYMANTEC is very​cunning..
Symantec now have a​redeemable cash back offe...

CAN: Jan 4, 6:25pm

Spider solitaire

Hi everyone!

Glad to have found​this site.  I have enjoyed reading​the c...

flwrchld53: Jan 4, 5:30pm

The Escaped Prisoner: When God Is a Monster

if islam is afraid of one woman, it​is sad. it is sad that a lot of​muslim ...

alex: Jan 2, 1:56pm

Generated in about 0.117s.

(Used 8 db queries)

mobile phone