- Code: Select all
"""
This is a doc String
"""
i.e leading and trailing terminators on their own lines.
Thats fine for modules/files, classes and (perhaps ) methods (usually) where theres often need for a multiline description but seems unnecessarily verbose for
class vars ( instance variables)
- Code: Select all
class MyClass
"""
This is MyClass which is a wonderful thing to behold,
clean and pristine in form, functional in all its uses and
superlative in its brevity
"""
var _usefulVar1
"""
Used for something useful like backing a property
"""
var _anotherVar
"""
Also useful in its own way
"""
def aMethod as int
"""
sole method giving interesting integers
"""
- Thats 4 lines of decl and description for each var decl only two of which is actual useful content
I'd like cobra to also support single line docStrings
e.g.
- Code: Select all
""" a single line docString"""
just to deverbose the above case (var decls) some
- Code: Select all
class MyClass
"""
This is MyClass which is a wonderful thing to behold,
clean and pristine in form, functional in all its uses and
superlative in its brevity
"""
var _usefulVar1
"""Used for something useful like backing a property. """
var _anotherVar
"""Also useful in its own way """
def aMethod as int
"""Sole method giving interesting integers"""
comments?