python newbie

Paul Rubin http
Sun Nov 4 12:23:38 EST 2007


Bruno Desthuilliers <bdesth.quelquechose at free.quelquepart.fr> writes:
> What's wrong with:
> 
> from StringIO import StringIO
> buf = StringIO('hello')

The other functions in the module aren't available then.  E.g.

  from random import random
  x = random()
  y = random.choice((1,2,3))   # oops



More information about the Python-list mailing list