PyCoder 509

PEP 646+679 已接受 原文: PyCoder’s Weekly - Issue #509 220126 Zoom.Quiet(大妈) 用时 13 分钟 完成快译 220126 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄. PEP 646: 可变参数泛型被接受 PYTHON.ORG This PEP introduces TypeVarTuple, enabling parameterisation with an arbitrary number of types. For example, it allows the type of array-like structures in numerical computing libraries such as NumPy and TensorFlow to be parameterised with the array shape, enabling static type checkers to catch shape-related bugs. The PEP was recently accepted by the Steering Council. 用 Python 构建 骰子 应用程序 REAL PYTHON In this step-by-step project, you’ll build a dice-rolling simulator app with a minimal text-based user interface using Python. The app will simulate the rolling of up to six dice. Each individual die will have six sides. (是也乎: 关键还是随机数, 如何真正随机 ) PEP 679: 允许在断言语句中使用括号 PYTHON.ORG “It is a common user mistake when using the form of the assert statement that includes the error message to surround it with parentheses. Unfortunately, this mistake passes undetected as the assert will always pass, because it is interpreted as an assert statement where the expression is a two-tuple, which always has truth-y value.” 严格的 Python 函数参数 SETH MICHAEL LARSON Learn about keyword-only and positional-only parameters and see how using strict function signatures can help you write more resilient code. 科学 Python 的指导设计原则 NSLS-II.GITHUB.IO Tips on how to design and organize scientific Python code. (是也乎: 还是最佳实践, 叕一组 ) 探讨/吐糟 Discussions None ...

2022-01-26 · 4 min · 1933 words · ZoomQuiet

PyCoder 508

FastAPI 0.72.0 来也 原文: PyCoder’s Weekly - Issue #508 220119 Zoom.Quiet(大妈) 用时 13 分钟 完成快译 220119 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄. 解析 “[]” 在 Python 中的嗯哼 BRETT CANNON “It’s quite possible you’re not familiar with this formal term, but you are probably familiar with the syntax: the square brackets used for indexing lists and tuples (sequence[4]), accessing the value of a specified dictionary (dictionary[“key”]), etc. To cover this topic we will break up into three parts: general subscriptions, slicing, and multiple arguments.” (是也乎: 老爹真的是在这对符号中玩出花儿了… ) 用 Pipenv 干活 REAL PYTHON COURSE Pipenv is a packaging tool for Python that solves some common problems associated with the typical workflow using pip, virtualenv, and requirements.txt. In this course, you’ll go over what problems Pipenv solves and how to manage your Python dependencies with it. (是也乎: ) 70 行 Python 实现概率编程语言 ANDREA COGNOLATO Learn how Probabilistic Programming Languages (PPLs) work by building a simple one in Python. (是也乎: 之前 50 行已经可以构造出不得了的东西了,现在 70行… ) Python News: 2021 12月新鲜事儿? REAL PYTHON The Python community elected its fourth steering council in December 2021. In this article, you’ll catch up on the results of the election as well as news about new maintenance releases of Python and about end-of-life for Python 3.6. 2021 年 Django 开发者调查结果 DSF + JETBRAINS FastAPI 0.72.0 发布 TIANGOLO.COM (是也乎: 叕一个永远不发布 1.0 的好东西 ) 探讨/吐糟 Discussions ...

2022-01-19 · 5 min · 2042 words · ZoomQuiet

PyCoder 507

PyCoder 召募兼职播客 原文: PyCoder’s Weekly - Issue #507 220112 Zoom.Quiet(大妈) 用时 13 分钟 完成快译 220112 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄. Hey there, Quick announcement: I’m looking to hire a talented PyCoder’s Weekly Curator and Podcast Co-Host to join the PyCoder’s team in a part-time, freelance role 🎉 In this role, you’ll research and curate links and news for PyCoder’s Weekly and you’ll regularly join the Real Python Podcast to co-host the show with Christopher Bailey to talk about the latest Python news and projects. You’ll work closely with me (Dan Bader) and the host of the RP Podcast (Christopher Bailey) in this role and we will train you on the specifics of our curation tools and podcast recording process. Basically, you’ll be getting paid to read Python articles and stay up to date with the latest projects and Python news 🎓🐍 If you’re interested or know anybody who would be a great fit for this role, check out the full job posting at the link below: → → PyCoder’s Curator and Podcast Co-Host (Part-Time, Remote) Wanted 用 Bulma 构建 Django 前端 - 第 2 部分 REAL PYTHON In the second part of this tutorial series, you’ll continue to build out a social network with Django. You’ll learn how to set up routing, views, and templates for your app. You’ll also apply CSS styling to the Django front end by using the Bulma framework to improve your app’s user interface. (是也乎: 作者 很 Python ) 用 Flask 上 Web 部署 Python 脚本 REAL PYTHON COURSE In this course, you’ll learn how to go from a local Python script to a fully deployed Flask web application that you can share with the world. (是也乎: 感觉现在 Django 和 Flask 文章的比例, 稳定在 5:1 左右 ) 从 Unravelling 声明中开解 BRETT CANNON Django Security 已发布: 4.0.1, 3.2.11, and 2.2.26 DJANGO SOFTWARE FOUNDATION 公布 2021 年第四季度的 PSF 会员 PYTHON SOFTWARE FOUNDATION 探讨/吐糟 Discussions ...

2022-01-12 · 4 min · 1867 words · ZoomQuiet

PyCoder 506

21 年 Django 开发者调查结果 原文: PyCoder’s Weekly - Issue #506 220105 Zoom.Quiet(大妈) 用时 13 分钟 完成快译 220105 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄. Gem: 探索式字符串替代 NED BATCHELDER Here’s a Python gem: a small bit of Python that uses the power of the language and standard library well. It’s a function to list strings generated by a pattern with embedded alternatives. It takes an input string with brace-wrapped possibilities, and generates all the strings made from making choices among them: explode("{Alice,Bob} ate a {banana,donut}.") (是也乎: 不是, 这项目名儿, 蹭 Ruby 的? ) 用 Django 构建社交网络 - 第 1 部分 REAL PYTHON In this four-part tutorial series, you’ll build a social network with Django to showcase in your portfolio. You’ll learn about relationships between Django models and how to use forms so that users can interact with your app. You’ll also make your site look good by using the Bulma CSS framework. (是也乎: 这插图有点儿马虎了 ) 通过构建自己的 Linter 来学习 Python ASTs TUSHAR SADHWANI • Shared by Tushar Sadhwani A guide to Abstract Syntax Trees in Python. They form the basis of a lot of tools we take for granted, like linters, code formatters and syntax highlighting. With this article you’ll get to learn about ASTs by building your own linter from scratch. (是也乎: 不是, ASTs 折腾明白了, 第一作品不应该是 DSL 嘛? ) urllib3 在 2021 年筹集到 15,000 美元 SETH MICHAEL LARSON 2021 年 Django 开发者调查结果 DJANGO SOFTWARE FOUNDATION (是也乎: 还有很多反直觉结果… ) 探讨/吐糟 Discussions ...

2022-01-05 · 4 min · 1961 words · ZoomQuiet