Jean-Michel Pichavant wrote:
div class=moz-text-flowed style=font-family: -moz-fixedScott
David Daniels wrote:
Jean-Michel Pichavant wrote:
Hello world,
I had recently a very nasty bug in my python application. The
context is quite complex, but in the end the problem can be resume
as
Hello world,
I had recently a very nasty bug in my python application. The context is
quite complex, but in the end the problem can be resume as follow:
2 files in the same directory :
lib.py:
import foo
foo.Foo.BOOM='lib'
foo.py:
class Foo:
BOOM = 'F'
if __name__=='__main__':
Jean-Michel Pichavant wrote:
Hello world,
I had recently a very nasty bug in my python application. The context is
quite complex, but in the end the problem can be resume as follow:
2 files in the same directory :
lib.py:
import foo
foo.Foo.BOOM='lib'
foo.py:
class Foo:
BOOM =
Jean-Michel Pichavant wrote:
Thanks for the explanation. I'll have to give it a second thought, I'm
still missing something but I'll figure it out.
Perhaps it is this:
1. When you run foo.py as a script, the interpreter creates module
'__main__' by executing the code in foo.py.
2. When that