Base class and Derived class question
cyberirakli at gmail.com
cyberirakli at gmail.com
Tue Nov 6 10:03:01 EST 2012
> in what Python version ?
Python 2.7.3
> How did all those angle brackets get into the file? Are you confusing
>
> an interactive interpreter session with running source files?
I've used angle brackets just for posting here,becauze this forum doesn't support [code][/code]
I have a file called baseClass.py with code abouve and indentation is correct.
Then I open python IDLE and type :
import baseClass as baseClassMod
reload(baseClassMod
class derivedClass(baseClassMod):
def dFunction(self):
print "We are in a derived Class"
After that i get the error above. But if I paste in Python IDLE a code from baseClass.py and just run:
class derivedClass(baseClass):
def dFunction(self):
print "We are in a derived Class"
it works perfectly.
Why happen this?
More information about the Python-list
mailing list