Re: exec, import and isinstance

2011-02-08 Thread Peter Otten
Michele Petrazzo wrote: > Hi all, > I'm playing with python internals and I'm discovering a strange behavior > of isinstance. Considering the following test case: > > test/bar.py > test/b.py > test/a/__init__.py > test/a/foo.py > > -- __init__.py -> empty > > --- foo.py: > class foo: pass > c =

exec, import and isinstance

2011-02-08 Thread Michele Petrazzo
Hi all, I'm playing with python internals and I'm discovering a strange behavior of isinstance. Considering the following test case: test/bar.py test/b.py test/a/__init__.py test/a/foo.py -- __init__.py -> empty --- foo.py: class foo: pass c = foo --- b.py def ret(): d = {} #s = "import sy