跳转至

391-400

Issue #391 Python at Scale, Arduino + Python, CPython 2.7.17 Released, and More Oct. 22, 2019

Cite

Python 2.7.17 Released
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.Full changelog here.

没想到都这么久远的版本还在release

Cite

What’s Your Favorite Python 3.8 Feature?
TWITTER.COM/DBADER_ORG

Cite

Keras vstf.keras: What’s the Difference in TensorFlow 2.0?
In this tutorial you’ll discover the difference between Keras and tf.keras. You’ll also learn what’s new in TensorFlow 2.0. ADRIAN ROSEBROCK

太长不看

Issue #392 Pythonic GUIs With PyQT, Auto-Formatting Your Code, Switching to Python 3.8, and More Oct. 29, 2019

Cite

When to Switch to Python 3.8
A quick rundown of the problems you might encounter when switching major Python versions. PYTHONSPEED.COM

主要的第三方库没有支持兼容,可以尝鲜没法用

docker打包flask

华丽花哨

Issue #393 Python's New Release Cycle, Guido Retires from Dropbox, GUIs With Kivy, and More Nov. 5, 2019

Cite

Build a Mobile App With the Kivy Python Framework
Learn how to build a mobile application with Python and the Kivy GUI framework. You’ll discover how to develop an application that can run on your desktop as well as your phone. Then, you’ll package your app for iOS, Android, Windows, and macOS. REAL PYTHON

感觉布局还是僵硬了点,而且调用传感器也不太方便

Cite

Why You Should Usepython -m pip
Arguments for why you should always usepython -m pipoverpip/pip3to control exactly which Python environment is used. BRETT CANNON

还是版本啥的

Cite

Thank You, Guido
“After six and a half years, Guido van Rossum, the creator of Python, is leaving Dropbox and heading into retirement.” DROPBOX.COM

guido在离职Dropbox前收到的感谢

awesome系列

Issue #394 PSF Sponsors Pip Development, List Comprehensions, Python's Growing Popularity, and More Nov. 12, 2019

Cite

Python Becomes 2nd Most Popular Language on GitHub
GitHub has published its latest State of the Octoverse report which provides fascinating insights into the development industry. DEVELOPER-TECH.COM

超越Java成为第二

看名字第一反应是ctypes,结果是个list

Cite

Developing a Single Page App With Flask and Vue.js
A step-by-step walkthrough of how to set up a basic CRUD app with Vue and Flask. MICHAEL HERMAN

一个DEMO

Cite

11 New Python Web Frameworks
DEEPSOURCE.IO

这些包的写法都好类似Flask。这个Sanic有点屌 看起来速度比Flask快很多,但是有俩主要问题,第一个是现在看起来还有很多的BUG,第二个是支持的拓展还不够丰富,生产环境估计够呛,得再等等

Issue #395 Python Threading, Pandas Optimizations, Django 3.0 RC is Out, and More Nov. 19, 2019

Cite

The Return of Python Dictionary “Addition”
An interesting summary of discussions around PEP 584 (“Add + and += operators to the built-in dict class”). JAKE EDGE

dict支持+的pep,应该还没被采纳

Cite

When Your Data Doesn’t Fit in Memory: The Basic Techniques
Python techniques for processing “bigger than RAM” data on a single computer, with minimal setup, and as much as possible using the same libraries you’re already using. ITAMAR TURNER-TRAURING• Shared by ITAMAR TURNER-TRAURING

数据量太大内存装不下怎么办 。加钱买好电脑…. 。分块处理数据。卧槽,什么辣鸡文章,用你说

Issue #396 PyCon 2020, KeyErrors, Unicode Struggles, and More Nov. 26, 2019

Cite

Symbolic Maths in Python
ALEXANDRU GRIS

Python中的符号数学

Issue #397 Python Steering Council, PIP_REQUIRE_VIRTUALENV, Django 3.0, and More Dec. 3, 2019

Cite

PyCharm 2019.3 Released
JETBRAINS.COM

这一期没啥想看的

Issue #398 MicroPython, PEP 591 ("final" qualifier), pytest Plugins, and More Dec. 10, 2019

Cite

MicroPython: An Intro to Programming Hardware in Python
Are you interested in the Internet of Things, home automation, and connected devices? In this tutorial, you’ll learn about MicroPython and the world of electronics hardware. You’ll set up your board, write your code, and deploy a MicroPython project to your own device. REAL PYTHON

Python3.4的简化版本,用于控制硬件相关

Cite

PEP 591: Adding afinalQualifier to Typing
This PEP proposes afinalqualifier to be added to thetypingmodule—in the form of afinaldecorator and aFinaltype annotation—to serve three related purposes: Declaring that a method should not be overridden, declaring that a class should not be subclassed, declaring that a variable or attribute should not be reassigned. PYTHON.ORG

final修饰符

Cite

Doing Python Configuration Right
“Let’s talk about configuring Python applications, specifically the kind that might live in multiple environments – dev, stage, production, etc.” MICHAEL WHALEN

多套环境切换,搞个环境变量ENV来表明是什么环境

Cite

Multithreading vs Multiprocessing in Python
A discussion of misconceptions about multithreading in Python. AMINE BAATOUT

多线程不是按顺序执行也不是并行执行,他们是随机的执行,一个执行一会然后就再让别的执行一会,因此如果你想利用多核CPU的能力就要用多进程 文章的结论 还一个结论就是 总之,别管啥,基本都用多进程就完事了

Issue #399 What Makes Python Great, Design Patterns vs Anti-Patterns, Poetry 1.0, and More Dec. 17, 2019

Cite

What Makes Python a Great Language?
“What makes Python a great language? It gets the need to know balance right. […] I would argue that the Python language has an incredibly well-balanced sense of what developers need to know. Better than any other language I’ve used.” STEVE DOWER

资瓷

Cite

Poetry 1.0 Released
Congratulations!Related discussion on Hacker News. PYTHON-POETRY.ORG

不知道现在安装包还卡不卡了

Cite

F-Strings Are Amazingly Fast!
RAYMOND HETTINGER

Cite

A Tiny Python Exception Oddity
“This would likely going to be found totally irrelevant by 99.999% of Python programmers. If you are not the type of person who is annoyed by tiny oddities, you probably do not want to read any further.” ANDRÉ ROBERGE

又开始花里胡哨了

牛逼,里面的我竟然一个都没听说过

还可以,介绍了一下type hint

Cite

Design Patterns in Python
DARINKA ZOBENICA

https://stackabuse.com/design-patterns-in-python/ 讲的很好,深入浅出,还没更新完,已建立单独页面阅读

Issue #400 Python Performance Tips, ASGI Web Frameworks, Dict Iteration Tips, and More Dec. 24, 2019

Cite

Python Performance Tips
Various tips and tricks that help improve the performance of your Python programs. SKIP MONTANARO

一些小tip 字符串连接别用s=s+s1,因为字符串是不可变对象,每次加都会新建一个字符串,正确的做法是s = "".join()

Cite

Python 3.8.1 Released
PYTHON.ORG

bugfix

Cite

How to Make Python Wait
“For many types of applications, at times it is necessary to pause the running of the program until some external condition occurs. […] In this article I’m going to show you a few different ways to wait.” MIGUEL GRINBERG

想让你的程序在某些时候等待,比如有个后台线程计算结果,主线程要用这个结果 最辣鸡的方法:

while result is None:
    pass
会大量占用CPU,但是啥也没干成 辣鸡的方法:
while result is None:
    time.sleep(5)
比上面那个方法占用CPU稍微好一点,但是也占用,而且每5s才查询一次,result就算算出来了也要等几秒 优雅的方法1: 用线程进行计算,主线程里join线程
优雅的方法2: 跟方法1差不多,可以用Threading包里的方法创建一个事件,然后在主线程里等待这个事件

Cite

Dependency Injection in Python With Pinject
Learn the basic principles of Dependency Injection and how to implement it in Python using the Pinject library. PEPY.TECH• Shared byPetru Rares Sincraian

没看懂

Cite

Guide to Python Import Statements
How to resolve common importing problems in Python 2 and 3. CHRIS YEH• Shared byJonathan Willitts

太长不看

评论