Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

何为调用栈 #69

Open
aermin opened this issue Jan 18, 2020 · 0 comments
Open

何为调用栈 #69

aermin opened this issue Jan 18, 2020 · 0 comments

Comments

@aermin
Copy link
Owner

aermin commented Jan 18, 2020

image

后进先出

调用栈

示例代码

def greet(name):
print "hello, " + name + "!" 
greet2(name) 
print "getting ready to say bye..." 
bye()

def greet2(name):
print "how are you, " + name + "?" 
def bye():
print "ok bye!"

在Python中,print是一个函数,但出于简化考虑,这里假设它不是函数。你也这样假 设就行了

浓缩介绍图

0ED50B24-4BAA-491B-8460-C94F653B8EAD

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant