Re: python newbie
- From: Paul Rubin <http://phr.cx@xxxxxxxxxxxxxx>
- Date: 04 Nov 2007 12:05:35 -0800
Bruno Desthuilliers <bdesth.quelquechose@xxxxxxxxxxxxxxxxxxx> writes:
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))
Really, a lot of these modules exist primarily to export a single
class or function, but have other classes or functions of secondary
interest. I'd like to be able to get to the primary function without
needing to use a qualifier, and be able to get to the secondary ones
by using a qualifier instead of having to import explicitly and
clutter up the importing module's name space like that. It just seems
natural.
.
- Follow-Ups:
- Re: python newbie
- From: Steven D'Aprano
- Re: python newbie
- References:
- python newbie
- From: Jim Hendricks
- Re: python newbie
- From: Bjoern Schliessmann
- Re: python newbie
- From: Bruno Desthuilliers
- Re: python newbie
- From: Hendrik van Rooyen
- Re: python newbie
- From: Steven D'Aprano
- Re: python newbie
- From: Duncan Booth
- Re: python newbie
- From: Paul Rubin
- Re: python newbie
- From: Duncan Booth
- Re: python newbie
- From: Paul Rubin
- Re: python newbie
- From: Paul Hankin
- Re: python newbie
- From: Paul Rubin
- Re: python newbie
- From: Bruno Desthuilliers
- Re: python newbie
- From: Paul Rubin
- Re: python newbie
- From: Bruno Desthuilliers
- python newbie
- Prev by Date: Re: python newbie
- Next by Date: Re: pygresql
- Previous by thread: Re: python newbie
- Next by thread: Re: python newbie
- Index(es):
Relevant Pages
|
|