Python syntax in Lisp and Scheme

David Mertz mertz at gnosis.cx
Wed Oct 8 15:43:32 EDT 2003


Marco Antoniotti <marcoxa at cs.nyu.edu> wrote previously:
|As for your comments on methods and generic functions it is obvious
|that you do not know what multiple dispatching is (yes, there is an ugly
|hacked up Python library to do that floating around; I do not know if it
|will make it it 3.0), so you comment looses value immediately.

This is absolutely replete with ignorance.  The multimethods module I
present at:

  http://www-106.ibm.com/developerworks/linux/library/l-pydisp.html

Is neither ugly nor hacked, and is just as general as what you would do
in Lisp (but with nicer looking syntax).  Neel Krishnaswami, and
probably other folks, have written similar modules before I did; I don't
claim to be all that original--it's not that difficult to do, after all.

You can grab it directly, btw, at:

  http://www.gnosis.cx/download/gnosis/magic/multimethods.py

Now OF COURSE, multimethods.py will not "make it into 3.0"--it's not in
2.3 or any other version either.  It's a 3rd party library... and it
will continue to work just fine whenever 3.0 comes out.  Most likely
with no changes, but I'll update it if needed (unless I get hit by a
bus, I suppose, but someone else could easily do the same).

Yours, David...

--
 mertz@   _/_/_/_/_/_/_/ THIS MESSAGE WAS BROUGHT TO YOU BY:_/_/_/_/ v i
gnosis  _/_/                    Postmodern Enterprises         _/_/  s r
.cx    _/_/  MAKERS OF CHAOS....                              _/_/   i u
      _/_/_/_/_/ LOOK FOR IT IN A NEIGHBORHOOD NEAR YOU_/_/_/_/_/    g s






More information about the Python-list mailing list