Python Freebie

davorg on 2005-04-06T10:16:06

I'm lucky enough that publishers occasionally send me free copies of books completely out of the blue. Last week I got possibly the most unexpected book I've ever recieved - a copy of the new edition of the Python Cookbook.

After scratching my head a bit, I remembered getting an email several months ago from the editor asking for my permission to credit me for a tip that they were using in the book. I was confused as to how anything I'd said could be of any use to a Python programmer, but after a fair amount of Googling I found what I was looking for.

It seems that a couple of years ago I got (briefly) involved in a discussion on the ActiveState Python board. They were discussing sorting algorithms and someone said that Python's "Decorate-Sort-Undecorate" (or DSU) method was very close to Perl's Schwartzian Transform. My sole input to the discussion was to point out that it was, in fact, closer to the Guttman-Rosler Transform.

And that's the fact that someone picked up on and thought would be useful enough to mention in the Python Cookbook. So there I am credited in recipe 5.2 on "Sorting a List of Strings Case-Insensitively" (along with Guido!) And that's why I got a free copy of the book.


Hey that was me!

oneiron on 2005-04-06T13:48:19

Hi Davorg. In all humility, it was me who first noticed this error in the Python Cookbook, as proved by this post. After my fwp post, I was delighted to see you post a correction to the Python Cookbook web site on 16 July 2003. Maybe you forgot you did that. :-)

Re:Hey that was me!

davorg on 2005-04-06T14:05:09

Well that, at least, explains how I heard about the discussion and found my way to the Python site. To be honest I _had_ completely forgotten about it until I got the email from the Python Cookbook team (which, it seems, was in October last year).

Anyway I'm sorry if I beat you to it in replying to the Python discussion.

Re:Hey that was me!

oneiron on 2005-04-06T14:12:26

No need for apology. Hope you enjoy the book. ;-) I'd long forgotten about that exchange also. I don't mind missing out on a free book because I've lost interest in Python since then and am pouring all my energy into learning Perl 6 nowadays. ^.^

Re:Hey that was me!

Aristotle on 2005-04-07T23:26:32

The choice of smart and beautiful people. ;-)