summaryrefslogtreecommitdiffstats
path: root/Misc/Vim/syntax_test.py
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2006-03-01 20:53:08 (GMT)
committerBrett Cannon <bcannon@gmail.com>2006-03-01 20:53:08 (GMT)
commit20e192b6a636f0f7a9d7cf85c6b30e64dc6c7bc6 (patch)
treeae01afc8bb6bed6a64fe6b59ebe3d6f89f95b885 /Misc/Vim/syntax_test.py
parenta9f068726fb4cf3693bd70b4b98bd0deaba45443 (diff)
downloadcpython-20e192b6a636f0f7a9d7cf85c6b30e64dc6c7bc6.zip
cpython-20e192b6a636f0f7a9d7cf85c6b30e64dc6c7bc6.tar.gz
cpython-20e192b6a636f0f7a9d7cf85c6b30e64dc6c7bc6.tar.bz2
Update for 'with' statement.
Diffstat (limited to 'Misc/Vim/syntax_test.py')
-rw-r--r--Misc/Vim/syntax_test.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/Misc/Vim/syntax_test.py b/Misc/Vim/syntax_test.py
index f313392..a530a25 100644
--- a/Misc/Vim/syntax_test.py
+++ b/Misc/Vim/syntax_test.py
@@ -13,20 +13,28 @@ repository.
# OPTIONAL: XXX catch your attention
# Statements
+from __future__ import with_statement # Import
+from sys import path as thing
assert True # keyword
def foo(): # function definition
return []
class Bar(object): # Class definition
- pass
+ def __context__(self):
+ return self
+ def __enter__(self):
+ pass
+ def __exit__(self, *args):
+ pass
foo() # UNCOLOURED: function call
while False: # 'while'
continue
for x in foo(): # 'for'
break
+with Bar() as stuff:
+ pass
if False: pass # 'if'
elif False: pass
-else False: pass
-from sys import path as thing # Import
+else: pass
# Constants
'single-quote', u'unicode' # Strings of all kinds; prefixes not highlighted