作者ntumath (math mad)
看板Python
标题[问题] python3.6版本的 f string
时间Sat Aug 12 03:39:46 2017
小弟我的环境是3.5,看到3.6版本新加的 f strings
觉得还满不错用的,可是在3.5的环境中无法通过
下面是官网的说明
https://www.python.org/dev/peps/pep-0498/#examples-from-python-s-source-code
我知道有 from__future__的方法,但是在这边我不知道该怎麽用
想请问如何解决
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 140.112.253.33
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1502480390.A.B31.html
1F:→ bibo9901: __future__ 是给 py2 用的 08/12 07:11
2F:→ bruce0209: 看到3.6版本”新”加的 f strings 08/12 07:50
3F:→ bruce0209: 可是在”3.5”的环境中无法通过 ??? 08/12 07:51
4F:→ bruce0209: 你的问题叙述是正确的吗… 08/12 07:52
5F:→ TitanEric: 3.6 > 3.5喔 08/12 09:52
6F:→ s8321414: 3.6才加的功能3.5怎麽会有......官方又没有backport 08/12 10:28