Commit ceee76c5 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

added a demo class

parent 25f65192
Pipeline #176 passed with stages
in 13 seconds
......@@ -14,3 +14,42 @@ def a_demo_function(*args):
>>> a_demo_function(None)
"""
return None
class ADemoClass:
"""
A demo class.
This class is a demo.
This is a second-line comment for extended summary.
Parameters
----------
first_name : str
The first name.
last_name : str
The last name.
Attributes
----------
first_name : str
The first name.
last_name : str
The last name.
Methods
-------
say_hello()
Print hello message.
Examples
--------
>>> a = ADemoClass("Jane", "Doe")
>>> a.say_hello()
"""
def __init__(self, first_name, last_name):
self.first_name = first_name
self.last_name = last_name
def say_hello(self):
print("Hello, {} {}!".format(self.first_name, self.last_name))
from .flip_image import flip_image, read_test_image
from .some_other_modules import a_demo_function
from .some_other_modules import a_demo_function, ADemoClass
__all__ = ["flip_image", "read_test_image", "a_demo_function"]
__all__ = ["flip_image", "read_test_image", "a_demo_function", "ADemoClass"]
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment