Debian Codegraph @

docs/dev_guide/comments.rst

raw
1 Directives: Comments
2 ====================
3
4
5 The template:
6
7 ::
8
9 Text before the comment.
10 ## The comment.
11 Text after the comment.
12 #* A multi-line comment spanning several lines.
13 It spans several lines, too.
14 *#
15 Text after the multi-line comment.
16
17 The output:
18
19 ::
20
21 Text before the comment.
22 Text after the comment.
23
24 Text after the multi-line comment.
25
26 The generated code:
27
28 ::
29
30 write('Text before the comment.\n')
31 # The comment.
32 write('Text after the comment.\n')
33 # A multi-line comment spanning several lines.
34 # It spans several lines, too.
35 write('\nText after the multi-line comment.\n')
36
37 Docstring and header comments
38 -----------------------------
39
40
41 The template:
42
43 ::
44
45 ##doc: .respond() method comment.
46 ##doc-method: Another .respond() method comment.
47 ##doc-class: A class comment.
48 ##doc-module: A module comment.
49 ##header: A header comment.
50
51 The output:
52
53 ::
54
55
56
57 The beginning of the generated {.respond} method:
58
59 ::
60
61 def respond(self,
62 trans=None,
63 dummyTrans=False,
64 VFS=valueFromSearchList,
65 VFN=valueForName,
66 getmtime=getmtime,
67 currentTime=time.time):
68
69 """
70 This is the main method generated by Cheetah
71 .respond() method comment.
72 Another .respond() method comment.
73 """
74
75 The class docstring:
76
77 ::
78
79 """
80 A class comment.
81
82 Autogenerated by CHEETAH: The Python-Powered Template Engine
83 """
84
85 The top of the module:
86
87 ::
88
89 #!/usr/bin/env python
90 # A header comment.
91
92 """A module comment.
93
94 Autogenerated by CHEETAH: The Python-Powered Template Engine
95 CHEETAH VERSION: 0.9.13a1
96 Generation time: Fri Apr 26 22:39:23 2002
97 Source file: x.tmpl
98 Source file last modified: Fri Apr 26 22:36:23 2002
99 """
100
101