#!/usr/bin/env python
"""Test file for Python syntax highlighting in editors / IDEs.
Meant to cover a wide range of different types of statements and expressions.
Not necessarily sensical or comprehensive (assume that if one exception is
highlighted that all are, for instance).
Extraneous trailing whitespace can't be tested because of svn pre-commit hook
checks for such things.
"""
# Comment
# OPTIONAL: XXX catch your attention
# TODO(me): next big thing
# FIXME: this does not work
# Statements
# Import
assert True # keyword
# function definition
return
# Class definition
pass
pass
# UNCOLOURED: function call
# 'while'
continue
# 'for'
break
pass
pass # 'if'
pass
pass
# Constants
, u # Strings of all kinds; prefixes not highlighted
"""triple double-quote"""
'''triple single-quote'''
r
ur
# octal
# hex
# unicode character
1 # Integral
1L
1.0 # Float
.1
1+2j # Complex
# Expressions
1 and 2 or 3 # Boolean operators
2 < 3 # UNCOLOURED: comparison operators
= 42 # UNCOLOURED: assignment
2 + 3 # UNCOLOURED: number operators
# UNCOLOURED: list
# UNCOLOURED: dict
# UNCOLOURED: tuple
# Built-in functions
# Exceptions