__init__(self,
typename=' Unknown ' ,
linecomments=( ) ,
blockcomments=( ) )
(Constructor)
| source code
|
Builds an instance of CommentInfo.
- Parameters:
typename - a string representing the language this comment info is related
to,
linecomments - a tuple of strings denoting the way single line comments are
represented in a given progamming language,
blockcomments - a tuple of tuples denoting how block comments are formatted. Each
first-level tuple contains a two-element second-level tuple,
where the first element is the string representing opening block
comments, and the second element represents closing block
comments.
As an example, a Java CommentInfo could be built as follows
:
>>> ci=CommentInfo('Java',('//',)(('/*','*/'),))
|