跳转至

421-430

Issue #421 Python vs JavaScript, Python Dev Survey 2019 Results, CPython 3.8.3 Released, and More May 19, 2020

Cite

Python vs JavaScript for Pythonistas
Python and JavaScript are two of the most popular programming languages in the world. In this tutorial, you’ll take a deep dive into the JavaScript ecosystem by comparing Python vs JavaScript. You’ll learn the jargon, language history, and best practices from a Pythonista’s perspective. REAL PYTHON

卧槽 要不要这么专业,这么长谁看。图还挺好

Cite

Python Caches Integers
Did you know that Python caches integers between -5 and 256? That is, these integer values are singletons, which means that any reference to one of them in your code references the same object in memory. Learn why Python does this and more in this short, but informative, article. ARPIT BHAYANI

Python中的 整数不是传统的4字节 8字节的实现,因此没有大小限制,用起来贼爽,但是缺点就是肯定要花费额外的空间。为了避免常用的整数被频繁的请求分配空间,-5到256是提前分配的单例

Cite

Call for Volunteers! Python GitHub Migration Work Group
The PSF is looking for volunteers to participate in a workgroup that will be involved with Python’s migration from bugs.python.org to GitHub. PYTHON SOFTWARE FOUNDATION

1

Cite

Python 3.9.0b1 Is Now Available for Testing
“Python 3.9 is still in development. This release, 3.9.0b1, is the first of four planned beta release previews. Beta release previews are intended to give the wider community the opportunity to test new features and bug fixes and to prepare their projects to support the new feature release.” CPYTHON DEV BLOG

字符串去除前缀和后缀方法

Cite

Why Do These Two Functions Have Different Output?
How well do you know how generator expressions and for loops work? REDDIT

Cite

Do You Use Walrus Operator := in Your Projects?
Do you walrus, coo coo ca choo? REDDIT

新版本没人用永远是个大问题

Cite

What is Python Redis? Enhance Python With Redis – the Fastest In-Memory Cloud Database
Install redis-py & Python Redis Client. Explore how Redis can enhance Python capabilities. Learn how to use Connection Pooling, SSL, Reading & Writing, & Opening a Connection with redis-py. REDIS LABSSPONSOR

也太入门了,跟百度知道回答的差不多

Issue #422 Async Python Tips, The Hypermodern Python Dev Setup, Job Hunting in a Pandemic, and More May 26, 2020

Cite

API Request Caching With Python & Redis
REDOWAN DELOWAR • Shared by Redowan Delowar

看完了又想学venv了

Issue #423 Python 3.9 PEPs, Dependency Mgmt & Injection, Python on the Raspberry Pi, and More June 2, 2020

Cite

The PEPs of Python 3.9
The first Python 3.9 beta release is upon us! Learn what to expect in the final October release by taking a tour of the Python Enhancement Proposals (PEPs) that were accepted for Python 3.9. JAKE EDGE

一些3.9的pep

竟然没看懂是啥玩意

Cite

Stop Using datetime.now! (With Dependency Injection)
How do you test a function that relies on datetime.now() or date.today()? You could use libraries like FreezeGun or libfaketime, but not every project can afford the luxury of reaching for third-party solutions. Learn how dependency injection can help you write code that is more testable, maintainable, and practical. HAKI BENITA

感觉说了跟没说一样,并没有说服我

Cite

A Pythonic Guide to SOLID Design
DEREK DRUMMOND • Shared by Derek Drummond

  • 单一原则:一个类或者方法只做一件事情
  • 开闭原则:可以改变函数的进入参数,不要改变输出格式
  • 里斯科夫的可替代性原则:子类可以替换父类而不破坏功能
  • 接口隔离原则:搞多个父类来继承?..
  • 依赖倒置原则:不依赖具体实现

requests的加强版,感觉应该学学异步了

Issue #424 Web Scraping Tools & Legality, How Async Should've Been, 90% Python Wheels Adoption, and More June 9, 2020

Cite

Fastest Way to Flatten a List in Python
Explore six different was to flatten a list of lists in Python and how their performance compares. The fastest of the six methods mentioned might surprise you! CHRIS CONLAN

一个测试

看来原地操作list效率比较高

Cite

Classifying Values Based on Ranges That Contain Them
Avoid big if/else blocks by using the bisect module! STACK OVERFLOW

bisect模块 https://stackoverflow.com/questions/30081275/why-is-1000000000000000-in-range1000000000000001-so-fast-in-python-3/ 回答里的这个也挺有意思

Cite

Combining Flask and Vue
Learn about three ways to combine Flask and Vue, the pros and cons of each, and some guidelines for when to use each method. JACE MEDLIN • Shared by Jace Medlin

海星

star还挺多

Issue #425 Async Python Isn't Always Faster, Python Space Science, Generators, and More June 16, 2020

Cite

How Do You Get the Count for Each Item in a List of Lists?
collections.Counter and itertools to the rescue! STACK OVERFLOW

1

Cite

How Does git Know What a Python Function/Class Definition Looks Like?
Hint: Regular expressions. Lots of them. TWITTER.COM/SIMONW

正则吧

Cite

Making Python Integers Iterable
You can’t loop over an integer in Python… unless you change the source code! Learn how to make integers iterable by altering the CPython source code. Also learn why this is a bad idea. ARPIT BHAYANI

花里胡哨整了一大堆,然后说不建议这样搞。不过还是说明用Python还是要学会C

数据库的东西

Issue #426 PEP 618 Accepted, Python vs COVID-19, "pickle" Flaws You Should Know About, and More June 23, 2020

Cite

PEP 618 Accepted for Python 3.10: Add Optional Length-Checking to zip()
PEP 618, which adds a new strict parameter to the built-in zip() function that optionally enforces same-length iterables, has been accepted for Python 3.10. Read the acceptance letter here and some interesting discussion about the PEP on Reddit. PYTHON.ORG

用的不多 不过确实很合理

Cite

Draw With Your CPU (Code Golf)
Here’s a challenge: draw the word “MAIL” on your operating system CPU usage graph. Can you think of a simple way to do it with Python? Read on and get your mind blown with a fun round of code golf. STACKEXCHANGE.COM

啥玩意

Cite

PySimpleGUI: The Simple Way to Create a GUI With Python
In this step-by-step tutorial, you’ll learn how to create a cross-platform graphical user interface (GUI) using Python and PySimpleGUI. A graphical user interface is an application that has buttons, windows, and lots of other elements that the user can use to interact with your application. REAL PYTHON

越来越觉得Python搞GUI不太靠谱,electeon不香嘛

Issue #427 Python-Powered Robot Dogs, What Is Core Python, Reducing Iterables, and More June 30, 2020

Cite

PEP 622: Structural Pattern Matching
This PEP proposes adding pattern matching—a sort of enhanced switch statement—to the Python language. Read the PEP at the link above and follow the discussion on Reddit. PYTHON.ORG

又有switch的pep了,这个看起来有点优雅,各种情况也说明的比较详细,看能不能通过吧

Cite

What Is the Core of the Python Programming Language?
What makes Python… Python? Is it the language semantics? A set of features? What could you strip away and still have something you’d call Python? Everyone needs a little programming language existentialism now and then. BRETT CANNON

还有拿rust写的Python解释器 https://github.com/RustPython/RustPython

Cite

PEP 620: Hide Implementation Details From the C API
Author Victor Stinner argues that Python’s C API is too close to the CPython implementation, which limits available optimizations and hinders the addition of new features. PEP 622 proposes hiding implementation details from the C API. PYTHON.ORG

对普通用户关系不大

Issue #428 Async Tribalism, "Wrong" Ways To Close a File, Django User Management, and More July 7, 2020

撒花

Cite

What Is the Core of the Python Programming Language?
Last week we featured Brett Cannon’s article with the same title. Well, the post has generated quite a discussion on Hacker News. HACKER NEWS

没啥用

Cite

Why Do People Use .format() When f-Strings Exist?
f-Strings aren’t exactly a drop-in replacement for .format(). REDDIT

各有千秋吧 之前用format感觉也还行,就是后期修改参数有点僵硬

Issue #429 Return of the print Statement, 13 Python Project Ideas, How PyPy Works, and More July 14, 2020

Cite

The (Non-)Return of the Python Print Statement
Guido van Rossum recently proposed re-introducing the Python print statement. He was completely serious and even though the idea didn’t gain traction, it’s interesting to know why he made the proposal. JAKE EDGE

从Python2过来的改变

Cite

A Beginner’s Guide to Robot Programming With Python
Get a crash course in programming autonomous robots with Python. Don’t have a robot laying around? No problem! Use this open-source simulator to get started. NICK MCCREA

https://github.com/nmccrea/sobot-rimulator/tree/master,好像是个模拟器

Cite

Python import: Advanced Techniques and Tips
The Python import system is as powerful as it is useful. In this in-depth tutorial, you’ll learn how to harness this power to improve the structure and maintainability of your code. REAL PYTHON

Real Python的文章还是优秀

Cite

Too Many Objects: Reducing Memory Overhead From Python Instances
Every Python object has a little bit of memory overhead, and that overhead can really add up if you need to create a huge number of instances. Find out where this overhead comes from and some strategies for reducing memory usage. ITAMAR TURNER-TRAURING

俩方法,一个是slot,一个是别用对象换别的?但是这个例子(100W)只有在特别多的实例的时候才有意义

Issue #430 Pythonic OOP & Mixins, Removing PyPI Packages, Django 3.1, and More July 21, 2020

Cite

Object-Oriented Programming (OOP) in Python 3
In this tutorial, you’ll learn all about object-oriented programming (OOP) in Python. You’ll learn the basics of the OOP paradigm and cover concepts like classes and inheritance. You’ll also see to how instantiate an object from a class. REAL PYTHON

OOP

Cite

10 Years of Flask: Conversation With Creator Armin Ronacher
Armin Ronacher is a guest on the Real Python Podcast to talk about the first 10 years of Flask. You’ll hear about the origins of Flask and the components that make up the framework. Armin also talks about what goes into documenting a framework or API, and the community working on the ongoing development of the Flask project. REAL PYTHON PODCAST

音频 我擦

Cite

Why You Shouldn’t Remove Your Package From PyPI
What to do if you need to deprecate a Python package that’s been published on the PyPI package repository. GONÇALO VALÉRIO

跟自己关系不大

Cite

Django 3.1 RC 1 Released
Django 3.1 release candidate 1 is the final opportunity for you to try out the potpourri of new features before Django 3.1 is released. DJANGO SOFTWARE FOUNDATION

就一个发布消息,我还以为会有更新内容

Cite

Python Developer (Remote)
SSI PEOPLE

应该学一下消息队列了

评论