forked from tanteng/learn-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Checking mergeability…
Don’t worry, you can still create the pull request.
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: sc4599/learn-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Could not load branches
Nothing to show
Loading
...
head repository: tanteng/learn-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Could not load branches
Nothing to show
Loading
- 6 commits
- 3 files changed
- 2 contributors
Commits on Apr 19, 2016
-
一般情况下,一个函数结束的时候,加一个return在代码上比较美观。可以更清楚的知道代码在哪里结束。
虽然不加也可以,但是建议加上。这样可以更清楚的知道代码在哪里结束。如果您用过try...except...else...finily结构的话,会明白的
xiaoxiaoyao committedApr 19, 2016 -
Merge pull request tanteng#4 from xiaoxiaoyao/patch-1
函数结尾加return
Commits on Apr 22, 2016
Commits on Apr 25, 2016
-
UnboundLocalError: local variable 'count' referenced before assignment. 什么意思?就是说conut这个变量你没有定义就直接引用了,我不知道这是个什么东西,程序就崩溃了.于是,再python3里面,引入了一个关键字:nonlocal,这个关键字是干什么的?就是告诉python程序,我的这个count变量是再外部定义的,你去外面找吧.然后python就去外层函数找,然后就找到了count=0这个定义和赋值,程序就能正常执行了.
xiaoxiaoyao committedApr 25, 2016 -
Merge pull request tanteng#5 from xiaoxiaoyao/patch-1
python中的闭包 for python 3.x
Loading
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...master