47+值得知道的 Py 字符串方法

原文: PyCoder's Weekly - Issue #541

pycoder

  • 220907 Zoom.Quiet(大妈) 用时 13 分钟 完成快译
  • 220907 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄.

How does a code completion tool work? What is an Abstract Syntax Tree, and how is it created in Python? How does an AST help you write programs and projects that inspect and modify your Python code? This week on the show, Meredydd Luff, co-founder of Anvil, shares his PyCon talk, “Building a Python Code Completer.”

(是也乎:

PODCAST

AST 好东西

)

Python’s strings have 47 methods. That’s almost as many string methods as there are built-in functions in Python! Which string methods should you learn first?

(是也乎:

和 Perl 类似, 字符串, 是日常最多应对场景,值得深入支持...

)

A Dragon Curve is a kind of fractal image. This article introduces you to the math behind the curve and how to draw one using a Python script.

(是也乎:

Dragon

龙式分形...supper cool.

)


探讨/吐糟

Discussions

(是也乎:

Yes & Not, 有的是朋友出书, 下单支持...

)


文章/教程/嗯哼

Articles, Tutorials and Talks

This step-by-step tutorial runs you through the use of gevent, a Python concurrency library. It covers synchronous and asynchronous execution, determinism, timeouts, monkey-patching, and much more. It has also been translated into Italian and Japanese.

A performance based shootout for pdm, pip-tools, pipenv, and poetry. It compares installation, lock file processing, and the time to add and update packages. Speed isn’t everything for tool choice, but knowing the difference may help you choose.

(是也乎:

反正都离开不能官方 pip 工具, 本质上并无什么改进

)

Everyone knows that smaller sites load faster, but did you know specific limits can make a big difference? Due to how TCP works and packets are grouped, a 14kB page can load more than half a second faster than a 15kB page. Learn why.

(是也乎:

14kB

知道 14kB 法则后 应该作什么?

None

)

If you want to have a peek at what’s coming in the next stable version of Python, then you can install a pre-release version. In this tutorial, you’ll learn how to access the latest Python versions and help test them.

(是也乎:

rcX

这得看本地系统了...

)

A short summary of a couple of academic papers on how to improve your debugging skills, broken down into: learn the codebase, learn the system, learn your tools, learn strategies, and gain experience.

(是也乎:

其实吧, 还是多接触各种类型的工程, 在具体场景中调试不同 bug , 才有经验积累

)

Daniel talks about how, despite once loving Jupyter, things keep getting in his way. Read about the downsides of notebooks and why one data scientist is moving to other tools.

(是也乎:

哈, 终于有人受不了 Jupter 了, 不过, 最后一条并不成立, Docker 化早已完成的.

)

This tutorial shows you how to transcribe a podcast using a speech-to-text Python SDK and derive a list of topics from it to quickly discover topics and meaning in text data.

This opinion piece talks about how dependency management and the lack of an executable make Python a problematic choice for writing tools.

(是也乎:

主要观点在嵌入式系统中, 如果将构建软件的部分让渡给用户, 太痛苦, 应该能给出二进制成果软件出来, 这原本就是软件工程师的任务...

好吧, 嵌入式的世界不太清楚, 只知道资源受限, 这方面也有 miniPy 等工程在支持,

所以, 看口味了.

不过, 其中有个观点很认同, Perl 就是 Python 的前世

)


好物/妙品/...

Interesting Projects, Tools and Libraries, Projects & Code

(是也乎:

毕竟 Python 的 AST 是 C 接口的...

ruff

)

(是也乎:

怪不得叫 codext

)


📆🐍 活动/大会

Events, MeetUp 真的是全球线下活动组织中心

(Use code realpython25 for 25% off)


DAMA

❤️ Happy Pythonic ;-(大妈私人无责任播报)

ACM-O

(是也乎:

谈崩了, 之前通过 ACM 会员可以每年 $25 享受 O'REILLY 在线图书馆服务...现在没了

)


PS:

PPS:

不觉中蟒周刊快译已经到了第11个年头

开始有小伙伴加入承担 pythonisa 周刊的翻译, 从来没提醒过, 可就这么默默坚持下来了...

问为什么:

[皱眉]每周新闻资讯 怎么能错过 
看看有什么新东西 
当有新的发现时:
    what f**k 还能这样玩? 还有这东西?
    每周开彩蛋[吃瓜]

无法同意更多... 很多社区贡献看起来辛苦, 其实受益最多的, 就是主动承担者也.


好文笔,感叹号年度配额: 1/3

投稿/反馈邮箱:

askdama@googlegroups.com

(邮件列表地址, 当成正常邮件发送邮件就好, 不用注册, 不用翻越...)


ZoomQuiet/大妈

就是四处 是也乎,( ̄▽ ̄) 的那个大妈:

私自嗯哼: ZoomQuiet (订阅号: ZoomQuiet42)
公开课程: 蟒营 (订阅号: Mainium)
历史吐糟: Chaos42 (订阅号 PythoniCamp)

as 创始组织者:
    PyChina (订阅号: PyChinaOrg)
    本地社区: 
        GDG珠海 (订阅号: GDG-ZhuHai)
        TFUG珠海 (订阅号: ZH_TFUG)


Comments


大妈的多重宇宙 - YouTube

全新自媒体系列...科学幻想,读书,说故事...

任何问题

随时邮件提问可也:
askdama@googlegroups.com

-->