跳到正文
每分钟自动更新
10月13日周二
  1. Simon Willison

    web-edit 0.1a1

    中文摘要

    发布:web-edit 0.1a1 包括由 Claude Opus 5.5 编写的性能优化,在我将其提供给 GPT-6 Astra 生成的 Python 3.15 分析报告之后。标签:分析,项目

    英文原文

    Release: web-edit 0.1a1 Includes performance optimizations written by Claude Opus 5.5 after I fed it this Python 3.15 profiling report generated by GPT-6 Astra. Tags: profiling , projects

  2. Simon Willison

    Hello Python 3.15, goodbye 3.10, and now I can use 3.11

    中文摘要

    Python 3.15来了!这是Python 3.15的必备更新指南,今年由3.14和3.15版本发布负责人Hugo van Kemenade整理。作为一名构建可在所有支持的Python版本中运行的开源软件的人,我可以说,我将告别Python 3.10,并开始拥抱Python 3.11的新特性。首先,一些Python 3.15的亮点。显式延迟导入我最兴奋的是来自PEP 810的显式延迟导入功能。这允许你像这样导入模块:lazy import json lazy from pathlib import Path 模块将在后续代码中首次使用这些符号时被导入。我的LLM命令行工具实现了插件。我不得不在插件作者文档中推荐手动延迟导入,因为仅仅安装使用了像sentence_transformers这样的重型依赖的插件,会使每次调用llm命令都增加数秒。延迟导入直接解决了这个启动成本。推导式中的解包新语法[*sublist for sublist in lists]非常棒。这里有一个从文档中摘录的示例:lists = [[1, 2], [3, 4], [5]] [*L for L in lists] # [1, 2, 3, 4, 5] # 等价于[x for L in lists for x in L]

    英文原文

    Python 3.15 is here ! Here's the essential What's new in Python 3.15 guide, this year curated by 3.14 and 3.15 release manager Hugo van Kemenade. As someone who builds open source software that works in every supported Python version, I get to say goodbye to Python 3.10 and start embracing features from Python 3.11. First, some highlights from Python 3.15. Explicit lazy imports I'm most excited about Explicit lazy imports from PEP 810 . These let you import modules like so: lazy import json lazy from pathlib import Path The module will then be imported the first time those symbols are used in the code that follows. My LLM CLI tool implements plugins. I had to recommend manual lazy imports in the plugin author documentation, because simply installing plugins that used heavy dependencies such as sentence_transformers could add multiple seconds to every invocation of the llm command. Lazy imports directly address this startup cost. Unpacking in comprehensions The new [*sublist for sublist in lists] unpacking syntax is neat. Here's an illustration lifted from the documentation : lists = [[ 1 , 2 ], [ 3 , 4 ], [ 5 ]] [ * L for L in lists ] # [1, 2, 3, 4, 5] # equivalent to [x for L in l

  3. Simon Willison

    Profiling web-edit with Python 3.15: flame graphs and source heatmaps

    中文摘要

    研究:使用 Python 3.15 对网页编辑进行剖析:火焰图和源代码热力图 我让 GPT-6 Astra Extra High 在 Codex 中运行,对新的 Python 3.15 分析器进行了测试,将其应用于我新的网页编辑应用程序:我需要从 PyPI 上的“web-edit”应用程序中得到一个 Python 3.15 火焰图和热力图演示——先进行研究,然后为我制作这些演示。 这是生成的火焰图和热力图示例。 标签:剖析,python,codex

    英文原文

    Research: Profiling web-edit with Python 3.15: flame graphs and source heatmaps I put the new Python 3.15 profiler through its paces by having GPT-6 Astra Extra High in Codex run it against my new web-edit app : I need a Python 3.15 flame graph and heatmap demo of the "web-edit" app from PyPI - research first then make me those demos Here's the resulting example flame graph and heatmap . Tags: profiling , python , codex