diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2012-11-28 21:15:28 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2012-11-28 21:15:28 +0100 |
commit | 37724cccf7258445d4d5b710519fbf4bcc2df7dc (patch) | |
tree | f4d11979ff34b291af7353e25744a152cdd80de2 | |
parent | 0f9fb5fcfd6a6dad08f01c435ed843f06ec37f70 (diff) | |
download | cython-37724cccf7258445d4d5b710519fbf4bcc2df7dc.tar.gz |
fix 'cimport cython' in string code fragments
-rw-r--r-- | Cython/Compiler/TreeFragment.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/TreeFragment.py b/Cython/Compiler/TreeFragment.py index 29ff12ded..983295983 100644 --- a/Cython/Compiler/TreeFragment.py +++ b/Cython/Compiler/TreeFragment.py @@ -26,7 +26,7 @@ class StringParseContext(Main.Context): self.module_name = name def find_module(self, module_name, relative_to = None, pos = None, need_pxd = 1): - if module_name != self.module_name: + if module_name not in (self.module_name, 'cython'): raise AssertionError("Not yet supporting any cimports/includes from string code snippets") return ModuleScope(module_name, parent_module = None, context = self) |