Issue 375

原文: PyCoder’s Weekly - Issue #375 更频繁的 Python 版本? JAKE EDGE “Łukasz Langa, who is the release manager for the upcoming 3.8 release, as well as the manager for the date-to-be-determined release of 3.9, has proposed PEP 596 (“Python 3.9 Release Schedule (doubling the release cadence)”). As its name would imply, the PEP proposes halving the current release cycle to nine months, which would make the 3.9 release happen in June 2020.” (是也乎: 事实证明, 开源项目版本攀爬速度,和基金会储备金数额呈正比关系 ) Python 标准库模块之间的依赖关系 DOUG HELLMANN What would a minimal Python standard library (only enough code to successfully download and install other packages) look like? Nice research and writeup. (是也乎: 这也算红学变种… 其实, miniPy 之类项目早已完成了这种鉴定 ) Python 中的函数编程 REAL PYTHON video Learn how to approach functional programming in Python. You’ll cover what functional programming is, how you can use immutable data structures to represent your data, as well as how to use filter(), map(), and reduce(). (是也乎: 真蟒的 FP.py 嗯哼… ) 如何构建 Raspberry Pi + Python 机器人 AUGUST R. GARCIA “Building robots seems expensive and complicated. However, it turns out that it’s relatively straightforward. Do you have an IQ higher than 90 and assorted random garbage lying around your house? Then you too can make a robot in a reasonably small amount of time.” (是也乎: 叕一则和 RPi 来相关的嗯哼 ) 如何通过 Python 用 Redis REAL PYTHON In this step-by-step tutorial, you’ll cover how to use both Redis and its Python client library. You’ll learn a bite-sized slice of Redis itself and master the redis-py client library. (是也乎: ) 检测用 Python,Go 和 Rust 编写的程序 NICOLAS HAHN “This is a subjective, primarily developer-ergonomics-based comparison of the three languages from the perspective of a Python developer” (是也乎: WoW 可见, Python 性能并没差太多…在数据量足够大时… 另外, 还有一种可能没测试: indygreg/PyOxidizer: A modern Python application packaging and distribution tool 用 Rust 将 Python 再编译后… ) SymPy 再次让数学变得有趣 WORDSANDBUTTONS.ONLINE Intro to SymPy, a Python library for symbolic mathematics. It aims to become a full-featured computer algebra system (CAS) while keeping the code as simple as possible in order to be comprehensible and easily extensible. (是也乎: 目标不是数值计算, 而是 计算机代数系统 (CAS) ) 讨论 Discussions ...

2019-07-03 · 4 min · 1952 words · ZoomQuiet

Issue 374

原文: PyCoder’s Weekly - Issue #374 如何用 Python Lambda 函数 REAL PYTHON In this step-by-step tutorial, you’ll learn about Python lambda functions. You’ll see how they compare with regular functions and how you can use them in accordance with best practices. (是也乎: 简单说, 用在应该用的地方就好 ) 如何在 Python 中轻松嗯哼进度条 CODINGDOSE.INFO • Shared by Franccesco Orozco A survey of Python progress bar libraries like Progress, ProgressBar2, TQDM, Click, and Clint that allow you to add animated progress bars to your command-line apps. (是也乎: 进度条, CLI 中的, 简直就是选择困难症激发重灾区… ) 将 Qt 应用程序从 C++ 移植到 Python 然后发现… ICS.COM “Our experience at ICS with Python and PyQt is that large complex (typically desktop) applications can be developed with Python. Users can’t tell that it was implemented in Python and not C++. Performance is typically not an issue, and experienced Qt C++ developers can quickly make the transition to Python.” (是也乎: 哈..多么痛的领悟… Qt Creator…能不用就不用… ) ...

2019-06-26 · 5 min · 2097 words · ZoomQuiet

Issue 373

原文: PyCoder’s Weekly - Issue #373 如果将自己的包合理发布到 PyPI REAL PYTHON video Learn how to create a Python package for your project and how to publish it to PyPI, the Python Package Repository with this step-by-step tutorial. Quickly get up to speed on everything from naming your package to configuring it using setup.py. (是也乎: 虽然教程很多, 但是, 有专用题图的不多. ) 比较Rust,Haskell,C,Python,Scala和OCaml中的相同项目 TRISTAN HUME “A rare opportunity to compare implementations of large programs that all did the same thing, written by friends I knew were highly competent, and have a fairly pure opportunity to see what difference design and language choices could make.” 走向 “Kernel Python” GLYPH LEFKOWITZ opinion “We need a newer, leaner, unburdened ‘kernel’ Python. We need to dump the whole standard library out on the floor, adding back only the smallest bits that we need, so that we can tell what is truly necessary and what’s just nice to have.” 在 Python 中用 main.py SHANE O’NEILL “The magic file main.py is called when you run your project with the -m module flag. If you code is intended to be used a module first, and command line interface second, this makes perfect sense to use. Think of it as a place we can put whatever would be in our body of our if name === “main” statement.” PyPI现在支持通过 WebAuthn 进行双因登录 PYFOUND.BLOGSPOT.COM “To further increase the security of Python package downloads, we’re adding a new beta feature to the Python Package Index: WebAuthn support for U2F compatible hardware security keys as a two-factor authentication (2FA) login security method.” PSF公布2019年董事会选举结果 TWITTER.COM/THEPSF “The 4 available seats go to: Lorena Mesa @loooorenanicole , Kushal Das @kushaldas, Marlene Mhangami @marlene_zw, and Jannis Leidel @jezdez. Congratulations to Lorena, Kushal, Marlene, and Jannis!” Python 动态编程示例 NATHAN GOLDBAUM A short introduction to the (confusingly named) concept of dynamic programming with Python. 讨论 Discussions ...

2019-06-19 · 4 min · 1744 words · ZoomQuiet

Issue 372

原文: PyCoder’s Weekly - Issue #372 Python 预测未来4年将超越 C 和 Java ZDNET.COM “Python’s ascent continues among software developers, bolstered by its usability compared with Java and C.” (是也乎: Go 在 10年前就预测过自己将在10年以内超越 JAVA ) CPython 3.8.0b1 可用于测试 PYTHON.ORG New features include: f-string debugging, “async REPL” mode, AsyncMock in unittest.mock, async-support for unittest, math.comb added, Python embedding got better, and more. 如何用 Tweepy 制作 Python Twitter 机器人 REAL PYTHON Learn how to make a Twitter bot in Python with Tweepy, which is a package that provides a very convenient way to use the Twitter API. You can use your Twitter bot to automate all or part of your Twitter activity. (是也乎: 等等, 为什么那么多教程都在尝试向一个不存在的网站自动化收发不存在的嗯哼? ) 2019 目前 Python 打包势态 STEFANO BORINI “In this post, I will try to explain the intricate details of Python packaging. I spent the best part of my evenings in the past two months to gather as much information as possible about the problem, the current solutions, what is legacy and what is not.” Related discussion on Hacker News (是也乎: Poetry 硬广, 但是, 也揭示至今, 有关部署 Py 环境, 还是没有统一靠谱方案. ) macOS 未来版本将不包括 Python 2.7 MICHAEL TSAI The next macOS release deprecates built-in Python 2.7 and other system scripting languages, such as Ruby. The system scripting languages on macOS have always lagged behind the latest releases, for example, the macOS system Python is still on 2.7. You’ll still be able to install Python 2 or Python 3 as you would most likely anyway today. (是也乎: 虽然从来不用系统内置的 Python, 但是, 这又是一个不买新 MBP 的理由了… ) 解决 Python 编程难题 ~> 循序渐进 DONNACHA OISÍN KIDNEY “This post is a write-up of a solution to part of a programming puzzle I did yesterday. It’s a little different than the usual ‘solution + theory’ approach, though: I’m going to talk about the actual steps you’d need to take to get to the solution (i.e. what to google, what intermediate code looks like, etc.).” 为 PyTorch 编写玩具后端编译器 BRAM WASTI “This tutorial is designed as an end-to-end walkthrough detailing all that is necessary for building and integrating a compiler into PyTorch’s JIT.” 讨论 Discussions ...

2019-06-12 · 4 min · 1952 words · ZoomQuiet