Comments (4)
还有字典是可以排序的,老哥,你用了一个字典生成式,这能证明字典可以排序???头一次听说,你只是证明了他可迭代,无法证明它可排序!!!
from magic-python.
第二节,end的使用方法,你的示例中不管那种都必被if或者else捕获,然后直接return,压根就走不到end的地方,我没有亲自实验,但是没报错不能说明这个东西有用,只能证明这个东西没有报错,请考虑一个严谨的例子。不然怕是误人误己
原文说,"在 Python 这种严格缩进的语言里并没有必要这样做",并没有说 end 这个东西有用。
另,如果语法不过关,解释器会直接报语法错误,没有报错,自然说明语法支持。文中举例从来没有说 end 有用。
from magic-python.
还有字典是可以排序的,老哥,你用了一个字典生成式,这能证明字典可以排序???头一次听说,你只是证明了他可迭代,无法证明它可排序!!!
不知所云。。
请参考官方说明:What’s New In Python 3.6
from magic-python.
还有字典是可以排序的,老哥,你用了一个字典生成式,这能证明字典可以排序???头一次听说,你只是证明了他可迭代,无法证明它可排序!!!
python2.7 到 python3.6 同样代码,输出结果差异那么明显,你却只关注到使用 字典生成式??
from magic-python.
Related Issues (20)
- c01/c01_24 HOT 2
- c02/c02_08 HOT 1
- c06/c06_02 HOT 1
- c06/c06_10 HOT 1
- c06/c06_12 HOT 1
- c05/c05_21 HOT 1
- c01/c01_08 HOT 3
- c01/c01_11 HOT 1
- c01/c01_28 HOT 1
- src/0020_battery_gauge/docs/0003_qcom_pax_%E7%94%B5%E9%87%8F%E8%AE%A1%E5%AF%B9%E6%AF%94%E5%88%86%E6%9E%90 HOT 1
- src/0000_example/README HOT 1
- c01/c01_12 HOT 3
- c01/c01_19 HOT 2
- c03/c03_13 HOT 1
- c01/c01_01 HOT 3
- c06/c06_03 HOT 1
- 中英文搜索
- c05/c05_02
- c07/c07_02 HOT 1
- c01/c01_22 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magic-python.