-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patho14objIntros.py
40 lines (32 loc) · 1 KB
/
o14objIntros.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
class employe:
def __init__(self, fname, lname):
self.fname = fname
self.lname = lname
self.email = f"{fname}.{lname}@gmail.com"
def explain(self):
return f"this employee is {self.fname} {self.lname}"
def mail(self):
return f"{self.fname}.{self.lname}@gmail.com"
@property
def Gmail(self):
if self.fname == None or self.lname == None:
return "Email is not set"
return f"{self.fname}.{self.lname}@gmail.com"
@Gmail.setter
def Gmail(self, string):
print("setting now")
names = string.split("@")[0]
self.fname = names.split(".")[0]
self.lname = names.split(".")[1]
@Gmail.deleter
def Gmail(self):
self.fname = None
self.lname = None
bangladeshi = employe("bangla" , "supporter")
a = 30
print(type(a))
print(id("this is mahadi"))
print(dir("this is nour"))
print(dir(bangladeshi))
import inspect
print(inspect.getmembers(bangladeshi))