Comments (5)
我本地下载个3.8试一下
from wtfpython-cn.
>>> [(yield x) for x in some_iterable]
SyntaxError: 'yield' inside list comprehension
>>> [(yield x) for x in some_iterable]
SyntaxError: 'yield' inside list comprehension
>>> list([(yield x) for x in some_iterable])
SyntaxError: 'yield' inside list comprehension
>>> list((yield x) for x in some_iterable)
SyntaxError: 'yield' inside generator expression
>>> list(some_func((yield x)) for x in some_iterable)
SyntaxError: 'yield' inside generator expression
3.8中的idle运行上面的语句报错.
https://github.com/leisurelicht/wtfpython-cn#-yielding-none%E7%94%9F%E6%88%90-none
from wtfpython-cn.
>>> [(yield x) for x in some_iterable] SyntaxError: 'yield' inside list comprehension >>> [(yield x) for x in some_iterable] SyntaxError: 'yield' inside list comprehension >>> list([(yield x) for x in some_iterable]) SyntaxError: 'yield' inside list comprehension >>> list((yield x) for x in some_iterable) SyntaxError: 'yield' inside generator expression >>> list(some_func((yield x)) for x in some_iterable) SyntaxError: 'yield' inside generator expression
3.8中的idle运行上面的语句报错.
https://github.com/leisurelicht/wtfpython-cn#-yielding-none%E7%94%9F%E6%88%90-none
3.8中把这个bug修复了,看这里.
from wtfpython-cn.
>>>a, b = "wtf!", "wtf!" >>>a is b # 仅适用于3.7版本以下, 3.7以后的返回结果为False. True
上述代码在Python 3.8中运行同样为True.注释存在错误.
运行环境: IDLE / Python 3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit (AMD64)] on win32
相关连接地址.
我觉得应该是3.8中ast的实现方式有更新,不过我没在 new list 中找到说明。
from wtfpython-cn.
好的,谢谢.
from wtfpython-cn.
Related Issues (20)
- 『Strings can be tricky sometimes/微妙的字符串 *』中 问题 HOT 4
- Class attributes and instance attributes/类属性和实例属性 HOT 2
- Subclass relationships/子类关系 * 的翻译 HOT 1
- is is not what it is!/出人意料的is! HOT 1
- is is not what it is!/出人意料的is! 单行赋值,交互式环境执行的版本问题
- 一个未配对的括号 HOT 1
- windows 10 运行 wtfpython 报错 HOT 1
- 333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 HOT 2
- 3333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 HOT 2
- MacOS pip3.6 安装wtfpython, run wtfpython后报错FileNotFoundError
- A tic-tac-toe where X wins in the first attempt!/一蹴即至! HOT 1
- Section: Strings can be tricky sometimes/微妙的字符串 * 中常量折叠在3.7中已经迁移至新的AST 优化器 HOT 1
- >>> 0.4-0.3 结果为啥是 0.10000000000000003 HOT 4
- Sync with English version HOT 2
- About Evaluation time discrepancy/执行时机差异 HOT 3
- 对/=运算符的疑惑 HOT 4
- 一个错别字... HOT 3
- Beware of default mutable arguments!/当心默认的可变参数!
- 中文版本的更新问题 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 wtfpython-cn.