667 B
667 B
Generate a Python class with the following specifications:
Class Name: {{ class_name }} {% if parent_class %} Inherits from: {{ parent_class }} {% endif %}
Attributes:
{% for attr in attributes %}
- {{ attr.name }}: {{ attr.type }}{% if attr.default %} = {{ attr.default }}{% endif %} {% endfor %}
Methods:
{% for method in methods %}
{{ method.name }}({{ method.params | join(', ') }})
{{ method.description }} Returns: {{ method.returns }} {% endfor %}
Example Usage:
{% for example in examples %}
{{ example }}
{% endfor %}
{% if additional_notes %}
Notes:
{% for note in additional_notes %}
- {{ note }} {% endfor %} {% endif %}