100 Awesome python traps examples, 1 new example per week
翻译 - 100个很棒的python陷阱示例,每周1个新示例
This article is a step-by-step guide to assembling and publishing a small, open-source Python package; topics covered include directory structure, basic unit tests, basic continuous integration setup,...
Python's built-in libraries include powerful tools for retrieving and operating over abstract syntax trees. This article provides an overview of how to use these features to analyze and transform Pyth...
Multiprocessing can be an effective way to speed up a time-consuming workflow via parallelization. This article illustrates how multiprocessing can be utilized in a concise way when implementing MapRe...
Native syntactic support for type annotations was introduced in Python 3. This article provides an overview of this feature, reviews how it can be used to document information about expressions and fu...
Python offers a rich set of APIs that make it possible to build wrappers for foreign functions written in another language (such as C/C++) and compiled into shared libraries. This article introduces s...
This article uses a simple use case involving a transaction between a vendor and a customer to illustrate the privacy-enhancing potential of oblivious transfer (OT) and to demonstrate how OT can be in...
Python's extensive support for operator overloading can help you greatly reduce the conceptual complexity of your library or framework, allowing programmers who must use it to leverage the extensive k...
This article covers some background on higher-order functions in Python, presents an overview of how Python decorators are defined and used, and illustrates their utility via a few use cases.
Iterators and generators are powerful abstractions within Python that have a variety of uses. This article reviews how they are defined, how they are related, and how they can help programmers work in...
Landing/redirect page for python.supply, where you can use Python as a platform to learn foundational concepts and practical techniques in computer science, programming, and software engineering.
While built-in string methods and regular expressions have limitations, they can be leveraged in creative ways to implement scalable workflows that process and analyze text data. This article explores...
This article presents a technique for assembling concise, lightweight specifications and unit tests for verifying the identity of a function; the technique sacrifices completeness to enable compact an...
Python metaclasses are how classes are created, and by defining your own metaclasses you can guide and constrain code contributors in a complex codebase. This article reviews how metaclasses can be em...
Python comprehensions are a powerful language feature that can greatly improve the productivity of a programmer and the readability of code. This article explores how comprehensions can be used to bui...
Both built-in and user-defined data structures in Python can be either mutable or immutable. This article explains why Python makes this distinction for built-in data structures and reviews some use c...