"Fossies" - the Fresh Open Source Software Archive

Member "cheetah3-3.2.6.post2/docs/dev_guide/comments.rst" (20 Apr 2021, 1895 Bytes) of package /linux/www/cheetah3-3.2.6.post2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the last Fossies "Diffs" side-by-side code changes report for "comments.rst": 3-3.1.0_vs_3-3.2.0.

Directives: Comments

The template:

Text before the comment.
## The comment.
Text after the comment.
#* A multi-line comment spanning several lines.
   It spans several lines, too.
*#
Text after the multi-line comment.

The output:

Text before the comment.
Text after the comment.

Text after the multi-line comment.

The generated code:

write('Text before the comment.\n')
#  The comment.
write('Text after the comment.\n')
#  A multi-line comment spanning several lines.
#    It spans several lines, too.
write('\nText after the multi-line comment.\n')

Docstring and header comments

The template:

##doc: .respond() method comment.
##doc-method: Another .respond() method comment.
##doc-class: A class comment.
##doc-module: A module comment.
##header: A header comment.

The output:

:

The beginning of the generated {.respond} method:

def respond(self,
        trans=None,
        dummyTrans=False,
        VFS=valueFromSearchList,
        VFN=valueForName,
        getmtime=getmtime,
        currentTime=time.time):

    """
    This is the main method generated by Cheetah
    .respond() method comment.
    Another .respond() method comment.
    """

The class docstring:

"""
A class comment.

Autogenerated by CHEETAH: The Python-Powered Template Engine
"""

The top of the module:

#!/usr/bin/env python
# A header comment.

"""A module comment.

Autogenerated by CHEETAH: The Python-Powered Template Engine
 CHEETAH VERSION: 0.9.13a1
 Generation time: Fri Apr 26 22:39:23 2002
   Source file: x.tmpl
   Source file last modified: Fri Apr 26 22:36:23 2002
"""