Re: [Tutor] Importing from classes

2015-02-11 Thread Steven D'Aprano
On Tue, Feb 10, 2015 at 06:39:50PM -0800, daaku gee wrote: > Hi > > When importing from other modules, I've seen syntax like: > > import from > import > > And another one: > import from as Not quite. The syntax is: import import as from import # not necessarily a class from imp

Re: [Tutor] Importing from classes

2015-02-11 Thread Alan Gauld
On 11/02/15 02:39, daaku gee wrote: When importing from other modules, I've seen syntax like: import from from import Note you don't import classes from modules you import names. (The name might be the name of a class of course!) This form is for cases where you only want to use one or

[Tutor] Importing from classes

2015-02-11 Thread daaku gee
Hi When importing from other modules, I've seen syntax like: import from import And another one: import from as Is one better than the other or is it just personal choice? Thanks \d ___ Tutor maillist - Tutor@python.org To unsubscribe or chan