f2format:用于Python 3.6格式的字符串文字(f字符串)的Backport编译器

时间:2021-04-02 00:34:35
【文件属性】:
文件名称:f2format:用于Python 3.6格式的字符串文字(f字符串)的Backport编译器
文件大小:87KB
文件格式:ZIP
更新时间:2021-04-02 00:34:35
backport pybpc f-string Python 注意:f2format目前正在重建中。 强烈建议直接从git repo或预发行发行版进行安装。 f2format 用Python 3.6风格编写f-string ,让f2format担心后端口问题 :beer_mug: 从,Python在3.6版中引入了文字。 尽管自年发布以来,Python 3.6仍然没有像预期的那样被广泛使用。 对于现在已经习惯使用f-string的用户, f2format通过将f-string转换为str.format表达式,提供了一个智能但不完善的backport编译器解决方案,这保证了您始终在Python 3.6中编写f-string 。风味,然后再编译以实现兼容性。 f2format受我的好伙伴启发和协助。 它通过将Python代码标记化和解析成多个抽象语法树(AST)来运行,通过它可以从f字符串文字中合成和提取表达式,然后使用str.format方法重新组装原始字符串。
【文件预览】:
f2format-master
----setup.py(2KB)
----.gitignore(2KB)
----.pyup.yml(127B)
----requirements-ci.txt(251B)
----Makefile(4KB)
----.readthedocs.yml(608B)
----pyproject.toml(233B)
----.travis.yml(337B)
----MANIFEST.in(347B)
----f2format.py(37KB)
----AUTHORS.md(610B)
----CONTRIBUTING.md(2KB)
----CODE_OF_CONDUCT.md(3KB)
----LICENSE(1KB)
----CHANGELOG.md(6KB)
----setup.cfg(86B)
----.gitmodules(85B)
----.github()
--------PULL_REQUEST_TEMPLATE.md(880B)
--------ISSUE_TEMPLATE()
--------issues()
--------FUNDING.yml(725B)
--------workflows()
----codec()
----README.md(3KB)
----Pipfile(631B)
----.coveragerc(222B)
----TODO.md(660B)
----.gitattributes(66B)
----docs()
--------requirements.txt(116B)
--------Makefile(638B)
--------make.bat(764B)
--------source()
----share()
--------make-demo.sh(2KB)
--------f2format.1(3KB)
--------test.py(6KB)
--------f2format.bash-completion(2KB)
--------f2format.rst(4KB)
----test()
--------test_7.txt(189B)
--------test_2.txt(46B)
--------test_2.py(139B)
--------test_5.pyw(60B)
--------test_1.py(462B)
--------test_0.py(123B)
--------percent.txt(28B)
--------test_0.pyw(123B)
--------test_5.txt(36B)
--------test_7.pyw(360B)
--------test_9.pyw(353B)
--------test_4.pyw(121B)
--------test_8.pyw(838B)
--------test_9.py(353B)
--------test_8.py(838B)
--------percent.pyw(53B)
--------test_driver.py(2KB)
--------test_0.txt(68B)
--------unparenthesized.txt(183B)
--------test_7.py(360B)
--------test_3.pyw(661B)
--------unparenthesized.py(502B)
--------test_2.pyw(139B)
--------test_1.txt(365B)
--------percent.py(53B)
--------test_4.txt(53B)
--------test_10.py(344B)
--------test_5.py(60B)
--------test_3.py(661B)
--------test_4.py(121B)
--------test_10.pyw(344B)
--------unparenthesized.pyw(502B)
--------test_6.py(88B)
--------test_10.txt(188B)
--------test_9.txt(455B)
--------test_6.txt(10B)
--------test_3.txt(338B)
--------test_8.txt(369B)
--------test_1.pyw(462B)
--------test_6.pyw(88B)
----.editorconfig(198B)
----mypy.ini(305B)

网友评论