Пример #1
0
 def is_constructor(self):
     return is_entity_constructor_command_name(self.name) or self.name == "__init__"
Пример #2
0
def get_rst_attr_file_header(class_name, index_ref, attr_name):
    """produce the rst content to begin an attribute-level *.rst file"""
    # use  :doc:`class_name<index>` syntax to create reference back to the index.rst file
    display_attr_name = '__init__' if is_entity_constructor_command_name(attr_name) else attr_name
    title = ":doc:`%s <%s>`  %s" % (class_name, index_ref, display_attr_name)
    return get_rst_file_header(title)