Issue 391

最后一个官方 Py2 版本 2.7.17 发布 原文: PyCoder’s Weekly - Issue #391 191006 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 191006 Zoom.Quiet(大妈) 用时 17 分钟 完成格式转抄. Arduino 微控制嘼 + Python: 入门 REAL PYTHON Discover how to use Arduino microcontrollers with Python to develop your own electronic projects. You’ll learn how to set up circuits and write applications with the Firmata protocol. You’ll control Arduino inputs and outputs and integrate the board with higher-level apps. (是也乎: Arduino 比 树莓派 其实不差… 只是, 上手嵌入系统, 电工一系列工具就得先准备并熟练了.. ) 为 Python 编写个 LLVM 专业工具 STEPHEN DIEHL “We’re going to build a single module Numba-like compiler for Python. It won’t be nearly as featureful or complete, but should demonstrate how you can go about building your own little LLVM specializer for a subset of Python or your own custom DSL expression compiler; and integrating it with the standard NumPy/SciPy stack for whatever scientific computing domain you work.” Python 2.7.17 发布 PYTHON.ORG Python 2.7.17 is a bug fix release in the Python 2.7.x series. It is expected to be the penultimate release for Python 2.7. 详细变更说明…. Python 代码复杂性瀑布 NIKITA SOBOLEV What can be done to prevent your Python code from getting too complex? A good linter setup does much more than finding missing commas and bad quotes. A good linter allows you to rely on it with architecture decisions and help you with the refactoring process. (是也乎: 还是得靠 linter 工具, 因为工程师总是不自主的在工程中将代码越写越复杂… ) 在 Python 中重新实现 Solaris 命令使 C 语言的性能提高了17倍 DARREN MOFFAT “As a result of fixing a memory allocation issue in the /usr/bin/listusers command, that had caused issues when it was converted to 64 bit, I decided to investigate if this ancient C code could be improved by conversion to Python.” (是也乎: 涉及性能, 古老的锅/坑总是 C 挖的… 现在, Python 也有机会来填/挖了… ) Y组合器的简单本质(用Python解释) LIONEL PARREAUX “The Y combinator is a central concept in lambda calculus, which is the formal foundation of functional languages. Y allows one to define recursive functions without using self-referential definitions.” (是也乎: 经典思想总是值得反复嗯哼的… 反正无论怎么推导,虽然总是能成功, 但是, 就是无法相信自己的眼睛… 直觉上中间一定有谁偷走了什么… ) 大规模 Python: 严格的模块 CARL MEYER The Instagram engineering team is experimenting with a technique for writing Python modules that are side-effect-free on import to reduce server startup time and unexpected global state changes. (是也乎: 好吧, 什么事儿数量一多都不容易…. ) Python 属性访问和描述符协议 AMIR RACHUM A deep dive into Python attribute access and the descriptor protocol. What exactly happens when we say foo.bar? 讨论 Discussions ...

2019-10-23 · 4 min · 1980 words · ZoomQuiet

Issue 390

VSCode 支持直接 Jupyter Notebook 编辑了 原文: PyCoder’s Weekly - Issue #390 191006 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 191006 Zoom.Quiet(大妈) 用时 17 分钟 完成格式转抄. CPython 3.8.0 发布 PYTHON.ORG Assignment expressions, positional-only arguments, = specifier in f-strings, and more. Click the link for the full changelog and download links. Python 3.8 的超酷新功能 REAL PYTHON What does Python 3.8 bring to the table? Learn about some of the biggest changes and see you how you can best make use of them. (是也乎: Python 也跟上了刷版本号并追加特性来刷声望的节奏… 大约 2027 年就能用上 Python 42.0.0 了 ) 由于 Python 的误解, 成千上万的科学论文可能无效 MIKE DRISCOLL Developers assumed that glob.glob() returns a sorted list of files, but it doesn’t. And this led to a number of statistical errors and data discrepancies in several published scientific papers. (是也乎: 一个内建函式误解导致的血案… 只能说大家相互抄的忒勤快了… ) Python range() 函式 REAL PYTHON video In this step-by-step course, you’ll master the Python range() function, learn how its implementation differs in Python 3 vs 2, and see how you can use it to write faster and more Pythonic code. (是也乎: 真蟒 的插图是真心走心了… ) 元编程在 Python SAURABH KUKADE “Meta-programming is an act of building functions and classes who can manipulate code by modifying, wrapping existing code or generating code.” (是也乎: 叕一则 元编程 体验… 只是, 这根本是语言自身表达能力不足时, 开放自省接口给用户来扩展表述的哪… 当然, 这么一来, 语言本身不稳定的锅就可以愉快的丢给用户了. ) Django 3.0 Beta 1 发布 DJANGOPROJECT.COM See the release notes for a list of changes and new features. PyPy V7.2 发布 MOREPYPY.BLOGSPOT.COM ARM aarch64 support, new JSON decoder, sandboxing makes a return, … 讨论 Discussions ...

2019-10-16 · 3 min · 1412 words · ZoomQuiet

Issue 389

Rust 来解决 Python 环境管理问题->pyflow 原文: PyCoder’s Weekly - Issue #389 191006 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 191006 Zoom.Quiet(大妈) 用时 17 分钟 完成格式转抄. Django 入门: 构建投资组合应用程序 REAL PYTHON video In this course, you’ll learn the basics of creating powerful web applications with Django, a Python web framework. You’ll build a portfolio website to showcase your web development projects, complete with a fully functioning blog. (是也乎: 好象今年开始, 真蟒 已经占据主要周刊内容了… ) 适用于 Python 的自动格式化程序 KEVIN PETERS • Shared by Kevin Peters An auto formatter is a tool that will format your code in a way it complies with the tool or any other standard it set. But which auto formatter should you use with Python code? (是也乎: 这种事儿叫用户选择会出人命的, 学习 golang, 及时官方钦定一个并内建才对 ) 用 Datadog 分布式跟踪和 APM 监视您的 Python 应用程序 DATADOG sponsor Debug and optimize your code by tracing requests across web servers, databases, and services in your environment—and seamlessly correlate those traces with metrics and logs to troubleshoot issues. Try Datadog in your environment with a free 14-day trial → (是也乎: 非常实诚的好服务 ) Timsort: 从未听说过的最快排序算法 BRANDON SKERRITT CPython uses Timsort for sorting containers. Timsort is a fast O(n log n) stable sorting algorithm built for the real world — not constructed in academia. PyPy 的新 JSON 解析器 PYPY STATUS BLOG PyPy has a new and faster JSON parser implementation. This post covers the design decisions that were made to develop the new and improved parser. (是也乎: 好象只有 PyPy 还在继续 Pythonic 之旅 ) 用 %autoreload 自动重新加载 Python 模块 SEBASTIAN WITOWSKI Tired of having to reload a module each time you change it? IPython’s %autoreload to the rescue! 教程中不常用的 六个 Django 模板标签 MEDIUM.COM/@HIGHCENBURG {% for … %} {% empty %} {% endfor %} anyone? (是也乎: 为什么不常用? 原因很明显了哪 ) (浮点) 数字, 丫们说谎 GLYPH LEFKOWITZ When and why 2 + 2 = 4.00000000000000000001… (是也乎: 老爹当年一闪神, 到今反复嗯哼永不断 ) Python 2.7 退休倒计时:〜2.5个月 PYTHONCLOCK.ORG (是也乎: 放心万里长城永不倒 ) 讨论 Discussions ...

2019-10-08 · 4 min · 1829 words · ZoomQuiet

Issue 388

NASA实锤对比Py和多种主力数据科学语言 原文: PyCoder’s Weekly - Issue #388 191006 Zoom.Quiet(大妈) 用时 42 分钟 完成快译 191006 Zoom.Quiet(大妈) 用时 17 分钟 完成格式转抄. Python 中如何用 Generators 和 Yield REAL PYTHON Learn about generators and yielding in Python. You’ll create generator functions and generator expressions using multiple Python yield statements. You’ll also see how to build data pipelines that take advantage of these Pythonic tools. (是也乎: 可以说, 真蟒, 一己之力, 将 Python 领域所有值得嗯哼的事儿, 这几年全部重新嗯哼了一遍… 这是为了获得完全自主产权的教材, 来构筑课程池? ) 对比 Python, Julia, Matlab, IDL 以及 Java NASA.GOV “We use simple test cases to compare various high level programming languages. We implement the test cases from an angle of a novice programmer who is not familiar with the optimization techniques available in the languages. The goal is to highlight the strengths and weaknesses of each language but not to claim that one language is better than the others.” (是也乎: 实锤了…. 没有一枝独秀, 只有相对优势. 如果自己用 Python 没毛病, 如果公司来, Java 永远正确. ) 正则表达式在 Python 中的性能 JUN WU “Working with regex, you have to understand what you are doing: the regex engine for Python, the type of statement you are writing, and alternative tools that are available for your purposes. Yes, there are instances when the re package may not be the best tool to use.” PEG 在 Core Developer Sprint GUIDO VAN ROSSUM “Every year for the past four years a bunch of Python core developers get together for a week-long sprint at an exotic location. These sprints are sponsored by the PSF as well as by the company hosting the sprint.” (是也乎: 老爹真的开始放飞了, 敢于放权给大家玩内核了… ) Mypy 0.730 发布 MYPY-LANG.BLOGSPOT.COM Mypy 0.730 is out, with prettier, colored output and error code support, along with many other fixes and improvements. (是也乎: 兼容 Py2 的生态圈已经正式起航…再次. ) Django Bugfix 发布: 2.2.6, 2.1.13 and 1.11.25 DJANGOPROJECT.COM 讨论 Discussions ...

2019-10-06 · 4 min · 1642 words · ZoomQuiet