-
Notifications
You must be signed in to change notification settings - Fork 12
/
testy_class_init.py
39 lines (33 loc) · 1.12 KB
/
testy_class_init.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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# =============================================================================
"""Answer for https://stackoverflow.com/q/52360498/1896134."""
# =============================================================================
class MyIntroduction():
"""Doc PlaceHolder."""
def __init__(self):
"""Doc PlaceHolder."""
self.name = ""
self.age = ""
self.education = ""
self.masters = ""
self.interestarea = ""
def set_info(self, name, age, education, masters, interestarea):
"""Doc PlaceHolder."""
self.name = name
self.age = age
self.education = education
self.masters = masters
self.interestarea = interestarea
def displayinformation(self):
"""Doc PlaceHolder."""
a = {'name': self.name,
'a': self.age,
'e': self.education,
'M': self.masters,
'IA': self.interestarea
}
print(a)
a = MyIntroduction()
a.set_info('Jay', 453, 'SelfTaught', 'Making Stuff Up', 'Space Captain')
a.displayinformation()