Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
81c3fbd3
Commit
81c3fbd3
authored
Nov 24, 2011
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fail gracefully on import instead of cimport from cython.view
parent
1fc34d3b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
Cython/Compiler/MemoryView.py
Cython/Compiler/MemoryView.py
+7
-1
No files found.
Cython/Compiler/MemoryView.py
View file @
81c3fbd3
...
...
@@ -12,6 +12,7 @@ STOP_ERR = "Axis specification only allowed in the 'step' slot."
STEP_ERR
=
"Step must be omitted, 1, or a valid specifier."
BOTH_CF_ERR
=
"Cannot specify an array that is both C and Fortran contiguous."
INVALID_ERR
=
"Invalid axis specification."
NOT_CIMPORTED_ERR
=
"Variable was not cimported from cython.view"
EXPR_ERR
=
"no expressions allowed in axis spec, only names and literals."
CF_ERR
=
"Invalid axis specification for a C/Fortran contiguous array."
ERR_UNINITIALIZED
=
(
"Cannot check if memoryview %s is initialized without the "
...
...
@@ -897,8 +898,13 @@ def _resolve_NameNode(env, node):
resolved_name
=
env
.
lookup
(
node
.
name
).
name
except
AttributeError
:
raise
CompileError
(
node
.
pos
,
INVALID_ERR
)
viewscope
=
env
.
global_scope
().
context
.
cython_scope
.
viewscope
return
viewscope
.
lookup
(
resolved_name
)
entry
=
viewscope
.
lookup
(
resolved_name
)
if
entry
is
None
:
raise
CompileError
(
node
.
pos
,
NOT_CIMPORTED_ERR
)
return
entry
def
_resolve_AttributeNode
(
env
,
node
):
path
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment