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
f42169b8
Commit
f42169b8
authored
Apr 01, 2020
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test that cascaded assignments support overwriting a variable that is still in use later.
parent
27b5adbb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
tests/run/cascadedassignment.pyx
tests/run/cascadedassignment.pyx
+12
-0
No files found.
tests/run/cascadedassignment.pyx
View file @
f42169b8
...
@@ -56,3 +56,15 @@ def test_cascaded_assignment_evaluate_expr():
...
@@ -56,3 +56,15 @@ def test_cascaded_assignment_evaluate_expr():
"""
"""
a
=
b
=
c
=
float
(
expr
())
a
=
b
=
c
=
float
(
expr
())
return
a
,
b
,
c
return
a
,
b
,
c
def
test_overwrite
():
"""
>>> test_overwrite()
{0: {1: {2: {}}}}
"""
x
=
a
=
{}
for
i
in
range
(
3
):
a
[
i
]
=
a
=
{}
assert
a
==
{}
return
x
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