python newbie
Bruno Desthuilliers
bdesth.quelquechose at free.quelquepart.fr
Sun Nov 4 14:13:58 EST 2007
Paul Rubin a écrit :
> 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
from random import random, choice
x = random()
y = choice((1, 2, 3))
More information about the Python-list
mailing list