-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsource.py
66 lines (52 loc) · 1.46 KB
/
source.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import inspect
class MainModule:
"""
I'm Module and I know it
"""
def __init__(self):
print("Source module got initiated...")
def get_some_sleep(self, really="Yes, really!"):
return really
@staticmethod
def welcome():
"""
This function serves no purpose other than showing this stupid message in marquee!!
"""
return '<marquee scrollamount="30"><h1>' + \
getattr(MainModule, inspect.currentframe().f_code.co_name).__doc__ + \
'</marquee>'
@staticmethod
def get_a(p1: int):
"""
Description for get_a
:param p1 just a random parameter
:return returns the description of the function
"""
if p1 is None:
return 'Set a value for p1 please...'
return int(p1)+5
def get_b(self, pa1='alpha', pa2=10, pa3=True):
"""
Description for get_b
"""
return '<br>'.join([getattr(MainModule, inspect.currentframe().f_code.co_name).__doc__,
str(pa1), str(pa2), str(pa3)])
def get_c(self):
return self.__doc__
def get_post_d(self, par1=[1, 2, 3, 4]):
"""
Aight
"""
return f'The type is: [{str(type(par1))}]'
def get_e(self, d={1:2, 2:4, 4:8}):
"""
Aight
"""
print(f'This is self = {self}')
print(f'This is d = {d}')
return d
def delete_f(self, param1={'some': 'map'}):
"""
I ain't deleting nothing bro
"""
return '<br>'.join([getattr(MainModule, inspect.currentframe().f_code.co_name).__doc__, str(param1)])