Hey folks! I know there hasn't been much activity in this channel lately, but I have some new content to share. I really hope it meets the quality standards you expect and that I always strive to provide. :) This Thursday, May 22 at 19:00 MSK, there'll be a li…
Python etc
频道Regular tips about Python and programming in general Owner — @pushtaev © CC BY-SA 4.0 — mention if repost
互动与广告
近 30 天帖子聚合
- 平均反应
- —
- 平均评论
- —
- 平均转发
- —
- 广告帖子(30 天)
- 0
- 广告占比
- —
- 被提及(30 天)
- 0
榜单位置
各窗口最近一次榜单
暂未进入榜单
频道进入榜单池并满足数据条件后会显示名次。
最近帖子
按发布时间倒序,最多展示 8 条
Great news everyone! We extracted all our recent posts as Markdown, organized them, and made them more accessible. Now we have: * 🌐 Website: pythonetc.orsinium.dev * 📢 RSS: pythonetc.orsinium.dev/index.xml * 🧑💻️ GitHub: github.com/life4/pythonetc If you want…
In addition to typing.ParamSpec, PEP 612 introduced typing.Concatenate that allows describing decorators that accept fewer or more arguments that the wrapped function: from typing import Callable, Concatenate, ParamSpec, TypeVar P = ParamSpec('P') R = TypeVar(…
Let's say, you have a typical decorator that returns a new function. Something like this: def debug(f): name = f.__name__ def inner(*args, **kwargs): print(f'called {name} with {args=} and {kwargs=}') return f(*args, **kwargs) return inner @debug def concat(a:…
Let's say, you have the following mock: from unittest.mock import Mock user = Mock() user.name = 'Guido' You fully specified all attributes and methods it should have, and you pass it into the tested code, but then that code uses an attribute that you don't ex…
Daylight saving time (DST) is the practice of advancing clocks (typically by one hour) during warmer months so that darkness falls at a later clock time and then turning it back for colder months. That means, sometimes, once a year the clock shows the same tim…
PEP-615 (landed in Python 3.9) introduced the module zoneinfo. The module provides access to information about time zones. It will try to use the information about time zones provided by the OS. If not available, it falls back to the official Python tzdata pac…
In the previous post, we had the following code: python import asyncio async def child(): ... async def main(): asyncio.create_task(child()) ... Can you spot a bug? Since we don't store a reference to the background task we create, the garbage collector may de…
相似频道
基于 Telegram 官方相似频道推荐
暂无相似频道
等待相似频道抓取任务运行。