Re: import issue with classes

2012-01-03 Thread Terry Reedy
On 1/3/2012 11:13 PM, Terry Reedy wrote: On 1/3/2012 10:06 PM, Andrew Berg wrote: On 1/3/2012 8:50 PM, Rodrick Brown wrote: Import FooA doesn't work and I need to use from FooA import FooA instead? This puzzles me. Thanks. If you have a module called FooA with a class called FooA, then import

Re: import issue with classes

2012-01-03 Thread Benjamin Kaplan
On Tue, Jan 3, 2012 at 9:50 PM, Rodrick Brown wrote: > I have a class FooB that derives from FooA > > i.e. > class FooB(FooA): >   FooA.__init__(self,...) > > Can someone explain why > > Import FooA doesn't work and I need to use from FooA import FooA instead? > This puzzles me. > Thanks. > > > >

Re: import issue with classes

2012-01-03 Thread Terry Reedy
On 1/3/2012 10:06 PM, Andrew Berg wrote: On 1/3/2012 8:50 PM, Rodrick Brown wrote: Import FooA doesn't work and I need to use from FooA import FooA instead? This puzzles me. Thanks. If you have a module called FooA with a class called FooA, then import FooA imports the /module/. The class would

Re: import issue with classes

2012-01-03 Thread Andrew Berg
On 1/3/2012 8:50 PM, Rodrick Brown wrote: > Import FooA doesn't work and I need to use from FooA import FooA > instead? This puzzles me. > Thanks. If you have a module called FooA with a class called FooA, then import FooA imports the /module/. The class would be FooA.FooA, just as the variable x

import issue with classes

2012-01-03 Thread Rodrick Brown
I have a class FooB that derives from FooA i.e. class FooB(FooA): FooA.__init__(self,...) Can someone explain why Import FooA doesn't work and I need to use from FooA import FooA instead? This puzzles me. Thanks. -- [ Rodrick R. Brown ] http://www.linkedin.com/in/rodrickbrown -- http://ma