Re: python newbie



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.
.



Relevant Pages

  • Re: Wishlist for R2007b
    ... Oops, I missed a part. ... Note that if you split the original line I posted into separate lines, ... you don't need the 'parent' qualifier for uibuttongroup. ...
    (comp.soft-sys.matlab)
  • Re: Subject: New Misterious Poker Room!!!
    ... I love to flash school teachers -- oops I overlooked the qualifier - no one credible ... Tanya AKA misst74 wrote: ...
    (rec.gambling.poker)