Skip to content
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
Uh oh!
There was an error while loading.
Please reload this page
.
python-core-org
/
python3.7sourcecode
Public
forked from
liuyuzhou/python3.7sourcecode
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Files
Expand file tree
master
Breadcrumbs
python3.7sourcecode
/
chapter8
/
my_calss_search.py
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
16 lines (12 loc) · 335 Bytes
master
Breadcrumbs
python3.7sourcecode
/
chapter8
/
my_calss_search.py
Copy path
Top
File metadata and controls
Code
Blame
16 lines (12 loc) · 335 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#! /usr/bin/python3
# -*-coding:UTF-8-*-
class MyClass(object):
i = 123
def __init__(self, name):
self.name = name
def f(self):
return 'hello,'+ self.name
use_class = MyClass('xiaomeng')
print(f'调用类的属性:{use_class.i}')
print(f'调用类的方法:{use_class.f()}')
# use_class = MyClass()
You can’t perform that action at this time.