跳转至

631-640

Issue #631 Tkinter, pyastgrep, Django 5.1, and More May 28, 2024

Cite

What’s New in Django 5.1
Django 5.1 has gone alpha so the list of features targeting this release has more or less solidified. This article introduces you to what is coming in Django 5.1. JEFF TRIPLETT

1

Cite

The Python calendar Module: Create Calendars With Python
Learn to use the Python calendar module to create and customize calendars in plain text, HTML or directly in your terminal. REAL PYTHON

日历相关功能calendar

Issue #632 Hashables, PyCon US Recap, Circular Imports, and More June 4, 2024

Cite

One Way to Fix Python Circular Imports
Python circular imports can be confusing. Simply using a different form of import can sometimes fix the problem. NED BATCHELDER

from module import func改成import module,然后用module.func来调用,可以解决循环引用的问题

Cite

Writing Fast String ufuncs for NumPy 2.0
NumPy 2.0 is coming shortly and has loads of big changes and new features. This article talks about NumPy’s universal functions which can be applied to the elements of a NumPy array, and how to write good ones when dealing with strings. LYSANDROS NIKOLAOU

Numpy的2.0版本,是一个大的更新,有很多新特性,这篇文章讲了如何写好的ufuncs

看起来是一个django的插件,记录对象的变化

Issue #633 String Interpolation, Music Processing, Command-Line Utilities, and More June 11, 2024

Cite

PEP 712 Rejected
This Python Enhancement Proposal “Adding a ‘converter’ parameter to dataclasses.field” was determined to have an insufficient number of use cases. PYTHON

高级用法,被拒绝了

Issue #634 NumPy 2.0, Calendar Versioning, Mappings, and More June 18, 2024

Cite

NumPy 2.0.0 Release Notes
The long awaited 2.0 release of NumPy landed this week. Not all the docs are up to date yet, but this final draft of the release notes shows you what is included. NUMPY.ORG

NumPy 2发布了,numpy.save支持大于4G的数据了

readme里都没整个效果图

Issue #635 Calendar Versioning, Rounding, Generating Test Data, and More June 25, 2024

Cite

redis-py: Redis Python Client
GITHUB.COM/REDIS

redis的python客户端

Issue #636 Build a Calculator, Satellite Data, Best Practices, and More July 2, 2024

Cite

Lazy f-strings
GITHUB.COM/POMPONCHIK • Shared by pomponchik

没有使用场景,不看

Issue #637 Apple App Store, Built-Ins, Constraint Programming, and More July 9, 2024

Cite

8 Versions of UUID and When to Use Them
RFC 9562 outlines the structure of Universally Unique IDentifiers (UUIDs) and includes eight different versions. In this post, Nicole gives a quick intro to each kind so you don’t have to read the docs, and explains why you might choose each. NICOLE TIETZ-SOKOLSKAYA

有8个版本,不是新旧的关系,而是不同的实现逻辑。通常就用默认的V4就可以,是完全随机生成的UUID,其他的可能会根据mac地址、时间戳啥的来生成,具体场景具体分析要用哪个

Issue #638 VS Code Settings, Leaked Creds, Free-Threaded CPython, and More July 16, 2024

Cite

My Programming Beliefs as of July 2024
This collection of thoughts outlines how Evan approaches coding, with the understanding that this might change in the future. His beliefs include using spikes, the difference between simple and easy, a preference for enums over booleans, and more. EVAN HAHN

1

Cite

How a Decorator Crashed My Flask App
This blog post shows how failing to use functools.wraps can cause issues with FlaskAPI. Learn why you should always use wraps and what went wrong. SUYOG DAHAL

深入理解了wraps的使用场景

import time
from functools import wraps

def timeit(func):
    @wraps(func)
    def wrapper(*args, **kwargs):
        start_time = time.time()
        result = func(*args, **kwargs)
        end_time = time.time()
        elapsed_time = end_time - start_time
        print(f"Function '{func.__name__}' executed in {elapsed_time:.4f} seconds")
        return result
    return wrapper
还有这个博客的配图好沙雕好喜欢

Cite

Python Has Too Many Package Managers
Overview of Python’s Package management ecosystem in 2024 and associated Hacker News Discussion LARRY DU

着重看了一下poetry的评价,确实除了依赖解析比较慢之外几乎完美了,也确实解析慢不是poetry的问题,还提到了一个uv,管理环境的,star也不少

Cite

Yen: The Last Python Environment Manager You’ll Ever Need
GITHUB.COM/TUSHARSADHWANI • Shared by Tushar Sadhwani

不同版本Python的启动器,可以下载不同版本的Python,然后在不同的虚拟环境中运行,学不动了,没有看到明显的优势。跟上面那篇博客看到了同一张图片

Issue #639 Asyncio Exceptions, Protocols, Free-Threaded CPython, and More July 23, 2024

Cite

Flask vs Django in 2024
This post compares Flask and Django, from what they specialize in to what it takes to do a personal web site in each. WILL VINCENT

Django很好,Flask也没毛病,FastAPI也不错

Issue #640 Great Tables, itertools, Asyncio In A Thread, and More July 30, 2024

Cite

Quiz: Python Type Checking
In this quiz, you’ll test your understanding of Python type checking. You’ll revisit concepts such as type annotations, type hints, adding static types to code, running a static type checker, and enforcing types at runtime. This knowledge will help you develop your code more efficiently. REAL PYTHON

小测试

Cite

PEP 751: A File Format to List Python Dependencies for Installation Reproducibility (New)
This PEP proposes a new file format for dependency specification to enable reproducible installation in a Python environment. PYTHON.ORG

又一个单文件依赖pep

评论