PyCoder 535

PEP 695:类型参数语法/草案 原文: PyCoder’s Weekly - Issue #535 220727 Zoom.Quiet(大妈) 用时 13 分钟 完成快译 220727 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄. 用 Django 构建 Flashcards 应用程序 REAL PYTHON Create your own flashcards app to help you to learn a new language. In this step-by-step project, you’ll replicate a spaced repetition system with the Django web framework. If you want to learn a new topic while sharpening your Django and Python skills, this tutorial is the perfect match for you! (是也乎: 嗯哼? 实体结合, 这很适合私人软件发售形式哪… ) 构建一个持久认证的 Python CLI CHRISTOPHER FLEETWOOD When building a command line program that authenticates to a service, you may not want the user to have to enter their password every single time. This article shows you how to manage authentication tokens to make you user’s life easier. The Twitter API is used as the example data source. (是也乎: 嗯哼? 这样安全嘛? ) 告别辣些过时的 Python 库 MARTIN HEINZ • Shared by Martin Heinz It’s time to say goodbye to os.path, random, pytz, namedtuple and many more obsolete Python libraries. Start using the latest and greatest ones instead. (是也乎: 如此决然的嘛? ) PEP 695: 类型参数语法(草案) PYTHON.ORG This Python Enhancement Proposals (PEP) draft describes an improved syntax for specifying type parameters within a generic class, function, or type alias. For example: class ClassA[T: str]: It also introduces a new statement for declaring type aliases. Django 4.1 候选版本 1 可用 DJANGO SOFTWARE FOUNDATION 探讨/吐糟 Discussions ...

2022-07-27 · 4 min · 1806 words · ZoomQuiet

PyCoder 534

是的,俺对侬的开源贡献有意见… 原文: PyCoder’s Weekly - Issue #534 220720 Zoom.Quiet(大妈) 用时 13 分钟 完成快译 220720 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄. 衡量代码质量/简单性和可维护性 REAL PYTHON PODCAST How maintainable is your Python code? Is it possible to hold the code for your functions in your head? When is it appropriate to use measurements in a code review? This week on the show, Reka Horvath and Ben Martineau from Sourcery are here to discuss their recent PyCon talk, “Actionable insights vs ranking: How to use and how NOT to use code quality metrics.” (是也乎: 其实, 如果不从小作品开始养成这种习惯, 到大团队, 基本上不可能适应, 或是推进类似品质管理 ) Subtests 在 Python PAUL GANSSLE “unittest.TestCase.subTest was originally introduced in Python 3.4 as a lightweight mechanism for test parameterization; it allows you to mark a section of your test as a separate test in its own right using a context manager.” Learn all about sub-tests in both the unittest module and pytest. (是也乎: 单元测试下, 还有一层测试… ) 在 Python 中并行处理大文件 ABID ALI AWAN When working with large amounts of data, using more than one CPU can lead to significant speed gains. Learn about various techniques that reduce data processing time by using multiprocessing, joblib, and tqdm. Python 3.11.0b4 发布 PYTHON.ORG 探讨/吐糟 Discussions ...

2022-07-20 · 4 min · 1817 words · ZoomQuiet

PyCoder 533

Python 3.11 发布可能被延迟 原文: PyCoder’s Weekly - Issue #533 220713 Zoom.Quiet(大妈) 用时 13 分钟 完成快译 220713 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄. Python 3.11 预览: TOML 和 tomllib REAL PYTHON Python 3.11 will be released in the fall of 2022. In this tutorial, you’ll install the latest beta release of Python 3.11 in order to preview the new tomllib module that’s added to the standard library. You’ll also explore some of the static typing enhancements that are coming. (是也乎: 淦…看来 TOML 是真的立住了 ) 用 Django 和 Angular 构建渐进式 Web 应用程序 ROB ALFORD • Shared by Rob Alford In this two-part article series, you’ll learn how to build a Progressive Web Application (and a fun trivia game) with Django and the Django Rest Framework for the backend API, and Angular for the frontend interface. (是也乎: Angular 嗯哼…上古神品 ) 在 Python 中使用断言应用约束 REDOWAN DELOWAR When applying runtime constraints on a value a common practice is to compare the value to an expected range and raise a ValueError if it’s not within the range. This article argues for the use of assert instead. (是也乎: 相比传统的 if , assert 更加简练 ) Python 3.11 发布可能被延迟 PYTHON.ORG Quart 现在是个 Pallets Project PALLETSPROJECTS.COM 探讨/吐糟 Discussions ...

2022-07-13 · 4 min · 2004 words · ZoomQuiet

PyCoder 532

用 Pyodide 构建 SPA 原文: PyCoder’s Weekly - Issue #532 220706 Zoom.Quiet(大妈) 用时 13 分钟 完成快译 220706 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄. 与 Bruce Eckel 一起探索函数式编程 REAL PYTHON PODCAST Would you like to explore the functional programming side of Python? What are the advantages of this approach, and what tools are built into the language? This week on the show, author Bruce Eckel talks about functional programming in Python. (是也乎: 老戏骨 Bibliography - MindView Exceptional Learning Experiences 写了一系列 Think in 的高手; PS: 只是 Think in Python 一直拖欠没发表… ) 用 Pyodide 构建单页应用程序 AMIR TADRISI • Shared by Amir Tadrisi Pyodide leverages WASM to run Python in the browser. In this tutorial, you’ll learn how to build a Single Page Application using Python and Pyodide including how to manipulate the DOM and manage state. (是也乎: 淦…这就已经有嵌入在 browser 中的 py 应用了… amirtds/netflix-analysis-spa at part-1 https://netflix-analysis-spa.onrender.com ) 带有 arvo 的程序音乐创作 SERGE-ÉTIENNE PARENT By using the music21 and avro libraries you can create musical scores programmatically. This article runs you through the libraries you need and how to compose your own music. (是也乎: 成调不成曲… ) Django High Security 已发布: 4.0.6 and 3.2.14 DJANGO SOFTWARE FOUNDATION PyTorch 1.12 已发布 PYTORCH.ORG 探讨/吐糟 Discussions ...

2022-07-06 · 4 min · 1741 words · ZoomQuiet