File: test_comments.py

package info (click to toggle)
source-highlight 1.11-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 4,872 kB
  • ctags: 4,699
  • sloc: sh: 3,633; cpp: 2,606; lex: 2,463; ansic: 1,610; makefile: 537; php: 185; perl: 145; yacc: 122; ruby: 63; sed: 53; python: 45; ml: 38; java: 30
file content (42 lines) | stat: -rw-r--r-- 662 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#! /usr/bin/python

"""
This is a test for the handling of
comments and string literals in Python
"""

"And this is a string meant as comment"

def test():		# The test routine
  '''
  It does nothing but printing different strings
  '''

  print "This is the first test",
  print 'and this the second'

  'Here start the multi-lined outputs'
  print """
Here we have
a multi-line
string.
"""
  print '''
And this is a
second one
'''
  # End of printing
  pass			# A NOP at last

"""
"""
'And here the fun starts'
test()

table = { 'S'  : ['5'],
 'a'  : ['4','a','@'],
 'b'  : ['8','B'],
 "ps" : ["Pz"],
 'ss' : ['5S','S5'],
 'es' : ['3Z','3z'],
 'ou' : ['00'] }