Issue 363

原文: PyCoder’s Weekly - Issue #363 PEP 570 (仅位参数)已被接受 PYTHON.ORG This PEP introduces a new syntax, /, for specifying positional-only parameters in Python function definitions. Looks useful for getting tighter control over how a library API can be called (i.e. preventing positional params from being called as keyword arguments). This will also allow for some function call speed optimizations in the future. (是也乎: 严格参数传输,以便优化…反正就是越来越 C++ 呗… 老爹一退休就乱来. ) 惯用式 Pandas: 你可能不知道的技巧和特征 REAL PYTHON video In this series you’ll see how to use some lesser-used but idiomatic Pandas capabilities that lend your code better readability, versatility, and speed. (是也乎: 忘记的就是不重要的 不知道的就是不必要 当然世界并不是这样 ( ̄▽ ̄) ) 用 PyCharm 成为 Python 大狮 JETBRAINS sponsor PyCharm is the Python IDE for Professional Developers by JetBrains providing a complete set of tools for productive Python, Web and scientific development. Be more productive and save time while PyCharm takes care of the routine. (是也乎: 通过 IDE 变成 guru ? 喝多了… ) 本地 LRU 缓存 MOSHE ZADKA How to avoid shared global state when using the functools.lru_cache decorator from the standard library. Python 3.7 使用慢加载 INADA NAOKI CPython 3.7 has a new feature (-X importtime) for profiling import time and this article gives you a good overview on how to use this to reduce application startup time. AvantPy: 友好的追溯 ANDRÉ ROBERGE AvantPy provides friendlier Python tracebacks, translated into various languages, to help beginners learn programming. Right now the project is still in its early stages and the maintainer is looking for contributors. (是也乎: 早期…寻求志愿者… 只是, 这种追踪代码运行状态, 对于初学有什么帮助? ) 讨论 Discussions ...

2019-04-10 · 3 min · 1349 words · ZoomQuiet

Issue 362

原文: PyCoder’s Weekly - Issue #362 如何在 Python 编码面试中脱颖而出 REAL PYTHON Take your Python coding interview skills to the next level and use Python’s built-in functions and modules to solve problems faster and more easily. (是也乎: 面经在国外也是显学哪… ) 看看 Python, 参数化 LUKE PLANT • Shared by Luke Plant Detailed article that explores the application of parameterization in Python and how it relates to mainstream design patterns such as dependency injection, strategy, template method, and others. Django 教程:建立自己项目组合网站 REAL PYTHON In this step-by-step tutorial, you’ll learn the basics of creating powerful web applications with Django, a Python web framework. You’ll build a portfolio application to showcase your web development projects, complete with a fully functioning blog. Django 2.2 LTS 发布 DJANGOPROJECT.COM What’s new? HttpRequest.headers to easily access request headers, database-level constraints on models, improved runserver performance when watching large project folders. Also, this is a long-term support (LTS) release, which means that security and data loss fixes will be applied for at least the next three years. (是也乎: LTS <== Ubuntu 制造出来的品牌… ) 有关过度使用 Comprehensions 以及 Generator Expressions TREY HUNNER • Shared by Ricky White Comprehensions are lovely, but they can easily be overused. In this article Trey shows you helpful examples and tips on sensible comprehension use in your own code. (是也乎: 代码简洁可读, 永远是代码第一原则. ) 六种简便方法在云中运行 Jupyter 笔记本 KEVIN MARKHAM A comparison of free services for running an interactive Jupyter Notebook in the cloud: Binder, Kaggle Kernels, Google Colab, Azure Notebooks, CoCalc, Datalore. (是也乎: Binder, Kaggle, Google, Microsoft, CoCalc, and Datalore… 简单的说, 简单但述求不同, 对于墙内的, 抱 M$ 的粗腿吧… ) ...

2019-04-04 · 4 min · 1552 words · ZoomQuiet

Issue 361

原文: PyCoder’s Weekly - Issue #361 Python 中的线程介绍 REAL PYTHON In this intermediate-level tutorial, you’ll learn how to use threading in your Python programs. You’ll see how to create threads, how to coordinate and synchronize them, and how to handle common problems that arise in threading. (是也乎: 真蟒, 系列插图, 真香… ) Python 到底是 Pass-By-Reference 或 Pass-By-Value? (2014) ROBERT HEATON A great explanation of Python’s argument-passing semantics. (是也乎: 参数传递的一次嗯哼… 手绘万岁… ) ...

2019-03-28 · 3 min · 1292 words · ZoomQuiet

Issue 360

原文: PyCoder’s Weekly - Issue #360 如何使用 wxPython 构建 Python GUI 应用 REAL PYTHON In this step-by-step tutorial, you’ll learn how to create a cross-platform graphical user interface (GUI) using Python and the wxPython toolkit. A graphical user interface is an application that has buttons, windows, and lots of other widgets that the user can use to interact with your application. 简化您的 Python 开发环境 MASON EGGER • Shared by Mason Egger How three tools (pyenv, pipx, pipenv) make for smooth, isolated, reproducible Python developer and production environments. (是也乎: 这,是非常重要的常用嗯哼哪… 只是, 一点儿也不简单..因为 Python 中一直就没有一个合理的工具一致性解决所有阶段的开发环境问题: 本地开发时的版本和模块依赖管理 测试时高速部署依赖模块 运行时自动化同步版本和依赖模块版本 Docker 是一把将所有阶段的环境问题用虚拟机解决了, 只是带来空间无法控制, 以及必须理解并忍受越来越多的专用工具; 所以, 先用已有工具组合为一个合理可理解的工具箱来完成是好的: pyenv 进行本地/测试/生产 的运行时版本和模块依赖树隔离 在 pyenv 之下.. conda 负责部分大型编译型模块的预编译管理 pipenv 进行模块的依赖/版本管理 嗯哼, 就是缺少一环: 可以高速冻结本地模块依赖树, 并能自动化同步模块树镜像到任意指定主机上; 以便从本地安装模块,而不依赖可怜的墙外网速… 再次感叹: dh-virtualenv, 已经解决了这一环的问题… ...

2019-03-21 · 4 min · 1940 words · ZoomQuiet