Commit a3f47bf2 authored by Stefan Behnel's avatar Stefan Behnel

merged in latest cython-devel

parents d179a356 946330df
......@@ -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:
......
......@@ -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)
......
......@@ -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
......
__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[:]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment