- Notifications
You must be signed in to change notification settings - Fork 31.8k
/
Copy pathpydoc_mod.py
51 lines (41 loc) · 1000 Bytes
/
pydoc_mod.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""This is a test module for test_pydoc"""
from __future__ importprint_function
importtypes
importtyping
__author__="Benjamin Peterson"
__credits__="Nobody"
__version__="1.2.3.4"
__xyz__="X, Y and Z"
classA:
"""Hello and goodbye"""
def__init__():
"""Wow, I have no function!"""
pass
classB(object):
NO_MEANING: str="eggs"
pass
classC(object):
defsay_no(self):
return"no"
defget_answer(self):
""" Return say_no() """
returnself.say_no()
defis_it_true(self):
""" Return self.get_answer() """
returnself.get_answer()
def__class_getitem__(self, item):
returntypes.GenericAlias(self, item)
defdoc_func():
"""
This function solves all of the world's problems:
hunger
lack of Python
war
"""
defnodoc_func():
pass
list_alias1=typing.List[int]
list_alias2=list[int]
c_alias=C[int]
type_union1=typing.Union[int, str]
type_union2=int|str