diff options
author | empyrical <empyrical@users.noreply.github.com> | 2016-08-05 16:17:57 -0600 |
---|---|---|
committer | empyrical <empyrical@users.noreply.github.com> | 2016-08-05 16:21:05 -0600 |
commit | b788e10a35670dc19cc0f5748ab3d97cf61d8cad (patch) | |
tree | c0f5f2bb63892fffcfab1cd3f0579d02c179d4ed /Cython/Compiler/CythonScope.py | |
parent | a767e7e8807aa315de72124daf0f464738ed85af (diff) | |
download | cython-b788e10a35670dc19cc0f5748ab3d97cf61d8cad.tar.gz |
Add support for the typeid operator
Diffstat (limited to 'Cython/Compiler/CythonScope.py')
-rw-r--r-- | Cython/Compiler/CythonScope.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Cython/Compiler/CythonScope.py b/Cython/Compiler/CythonScope.py index d39588fca..00b912a81 100644 --- a/Cython/Compiler/CythonScope.py +++ b/Cython/Compiler/CythonScope.py @@ -67,7 +67,9 @@ class CythonScope(ModuleScope): name_path = qname.split(u'.') scope = self while len(name_path) > 1: - scope = scope.lookup_here(name_path[0]).as_module + scope = scope.lookup_here(name_path[0]) + if scope: + scope = scope.as_module del name_path[0] if scope is None: return None |