[issue30888] import class not isinstance of the class

2017-07-17 Thread 邱伟略
邱伟略 added the comment: ok. i see what you mean. so python mark the class from the import way -- resolution: not a bug -> works for me stage: -> resolved status: pending -> closed ___ Python tracker ___

[issue30888] import class not isinstance of the class

2017-07-10 Thread Ronald Oussoren
Ronald Oussoren added the comment: In foo2.py you import "a.foo", which refers to module 'a' that isn't included in the directory structure you describe. I'm assuming 'dirc' should be 'a' to match the code. How did you run foo1.py? When running with 'python3.6 -m bug.foo1' I get an error a

[issue30888] import class not isinstance of the class

2017-07-09 Thread 邱伟略
New submission from 邱伟略: the working directory is like below: bug/ dirc/ __init__.py foo.py foo2.py __init__.py foo1.py in foo.py: ``` class Event(object): pass ``` in foo2.py: ``` from a.foo import Event def fun(): return Event() ``` in foo1.