forked from qiwsir/StarterLearningPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path21102.py
More file actions
28 lines (21 loc) · 497 Bytes
/
21102.py
File metadata and controls
28 lines (21 loc) · 497 Bytes
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
#!/usr/bin/env python
# coding=utf-8
__metaclass__ = type
class ProtectMe:
def __init__(self):
self.me = "qiwsir"
self.__name = "kivi"
def __python(self):
print "I love Python."
def code(self):
print "Which language do you like?"
self.__python()
@property
def name(self):
return self.__name
if __name__ == "__main__":
p = ProtectMe()
#print p.me
print p.name
#p.code()
#p._ProtectMe.__python()