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
a3f47bf2
Commit
a3f47bf2
authored
Jun 01, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
merged in latest cython-devel
parents
d179a356
946330df
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
2 deletions
+22
-2
Cython/Compiler/Parsing.py
Cython/Compiler/Parsing.py
+1
-1
Cython/Compiler/TreeFragment.py
Cython/Compiler/TreeFragment.py
+2
-1
tests/bugs.txt
tests/bugs.txt
+1
-0
tests/run/with_statement_module_level_T536.pyx
tests/run/with_statement_module_level_T536.pyx
+18
-0
No files found.
Cython/Compiler/Parsing.py
View file @
a3f47bf2
...
...
@@ -2707,7 +2707,7 @@ def p_module(s, pxd, full_module_name):
s.parse_comments = False
if 'language_level' in directive_comments:
s.context.set_language_level(
'language_level'
)
s.context.set_language_level(
directive_comments['language_level']
)
doc = p_doc_string(s)
if pxd:
...
...
Cython/Compiler/TreeFragment.py
View file @
a3f47bf2
...
...
@@ -14,6 +14,7 @@ from ExprNodes import NameNode
import
Parsing
import
Main
import
UtilNodes
import
StringEncoding
"""
Support for parsing strings into code trees.
...
...
@@ -120,7 +121,7 @@ class TemplateTransform(VisitorTransform):
temphandles
=
[]
for
temp
in
temps
:
TemplateTransform
.
temp_name_counter
+=
1
handle
=
"__tmpvar_%d"
%
TemplateTransform
.
temp_name_counter
handle
=
StringEncoding
.
EncodedString
(
"__tmpvar_%d"
%
TemplateTransform
.
temp_name_counter
)
# handle = UtilNodes.TempHandle(PyrexTypes.py_object_type)
tempmap
[
temp
]
=
handle
# temphandles.append(handle)
...
...
tests/bugs.txt
View file @
a3f47bf2
...
...
@@ -12,6 +12,7 @@ compile.cpp_operators
cpp_templated_ctypedef
cpp_structs
genexpr_T491
with_statement_module_level_T536
# CPython regression tests that don't current work:
pyregr.test_threadsignals
...
...
tests/run/with_statement_module_level_T536.pyx
0 → 100644
View file @
a3f47bf2
__doc__
=
"""
>>> inner_result
['ENTER']
>>> result
['ENTER', 'EXIT (None, None, None)']
"""
result
=
[]
class
ContextManager
(
object
):
def
__enter__
(
self
):
result
.
append
(
"ENTER"
)
def
__exit__
(
self
,
*
values
):
result
.
append
(
"EXIT %r"
%
(
values
,))
with
ContextManager
()
as
c
:
inner_result
=
result
[:]
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