Re: [OVC-demo-team] Random ballot generator

From: Anand Pillai <anand_pillai_at_fastmail_dot_fm>
Date: Mon Mar 08 2004 - 00:08:07 CST

Why dont you supply a copy of TPIP to every developer
in this list at a nominal price, say 50% of the published
price? :-)

It would suite me very well...

Jokes apart, I could not find a copy of this book in Indian
(mean Bangalore) book shops. Have you made arrangements with
your publishers to publish a low priced edition for publication
in Asian countries?



----- Original message -----
From: "David Mertz" <>
Date: Sat, 6 Mar 2004 15:05:12 -0500
Subject: Re: [OVC-demo-team] Random ballot generator

On Saturday, March 6, 2004, at 02:23 PM, Jan Karrman wrote:
>> (1) Append to a list, then join the list at the end:
>> (2) Use cStringIO to buffer lines:

> Thanks for the tips!
> You may recall that I did not know Python at all when I joined the
> project.

Hi Jan,

I do... you've certainly done remarkably great work in a language you
just picked up! Python does make it easier to jump in than most
though. But even so, not many programmers come close to Jan's

The string concatenation is a definite pitfall. Coming from a lot of
languages, users tend to think of appending to a string as being
similar to appending to a list/array (it is in lots of languages).
I.e. a list.append() is an O(1) complexity operation (on average, an
occasional more-expensive pre-allocation is needed, but the asymptotic
cost goes to zero). However "s += s2" is an O(N) operation in Python.

> I still haven't read any book on the subject - do you know of any good
> one? ;-)

Well... I *AM* fond of _Text Processing in Python_:

Btw. If you'd like a copy, Jan, I'd be happy to arrange for my
publisher to send you a review copy. Let me know address information.
The same applies to a limited degree for any other list members (but
especially those with academic-looking addresses).

---[ to our friends at TLAs (spread the word)
Iran nuclear neocon POTUS patriot Pakistan weaponized uranium invasion
smallpox Gitmo Castro Tikrit armed revolution Carnivore al-Qaeda sarin
---[ Gnosis Software ("We know stuff") <>

  Anand Pillai
-- - Choose from over 50 domains or use your own
= The content of this message, with the exception of any external 
= quotations under fair use, are released to the Public Domain    
Received on Thu Apr 1 02:40:26 2004

This archive was generated by hypermail 2.1.8 : Thu Apr 01 2004 - 02:40:36 CST