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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
cython
Commits
38ceddfd
Commit
38ceddfd
authored
Oct 21, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug 429: make 'locals' builtin overridable
parent
50b15073
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+5
-1
tests/bugs.txt
tests/bugs.txt
+0
-1
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
38ceddfd
...
...
@@ -978,8 +978,12 @@ class TransformBuiltinMethods(EnvTransform):
# locals builtin
if
isinstance
(
node
.
function
,
ExprNodes
.
NameNode
):
if
node
.
function
.
name
==
'locals'
:
pos
=
node
.
pos
lenv
=
self
.
env_stack
[
-
1
]
entry
=
lenv
.
lookup_here
(
'locals'
)
if
entry
:
# not the builtin 'locals'
return
node
pos
=
node
.
pos
items
=
[
ExprNodes
.
DictItemNode
(
pos
,
key
=
ExprNodes
.
StringNode
(
pos
,
value
=
var
),
value
=
ExprNodes
.
NameNode
(
pos
,
name
=
var
))
for
var
in
lenv
.
entries
]
...
...
tests/bugs.txt
View file @
38ceddfd
...
...
@@ -8,5 +8,4 @@ unsignedbehaviour_T184
bad_c_struct_T252
missing_baseclass_in_predecl_T262
extended_unpacking_T409
locals_rebind_T429
locals_expressions_T430
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