I was wondering if the declarations placed at the beginning of the python class are equivalent to the statements in __init__? for instance
import sys
class bla():
print 'not init'
def __init__(self):
print 'init'
def whatever(self):
print 'whatever'
def main():
b=bla()
b.whatever()
return 0
if __name__ == '__main__':
sys.exit( main() )
Conclusion:
not init
init
whatever
As a support, right now I am also getting:
Fatal Python error: PyImport_GetModuleDict: no module dictionary!
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application support team for more information.
Any ideas on why this is? Thank you in advance!
source
share