python newbie

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Sun Nov 4 17:13:18 CET 2007


Paul Rubin a écrit :
> Paul Hankin <paul.hankin at gmail.com> writes:
> 
>>I'm intrigued - when would you want a callable module?
> 
> 
> I think it would be nice to be able to say
> 
>    import StringIO
>    buf = StringIO('hello')
> 
> instead of
> 
>   import StringIO
>   buf = StringIO.StringIO('hello')

What's wrong with:

from StringIO import StringIO
buf = StringIO('hello')

???



More information about the Python-list mailing list