The biggest Python topics of 2023 ›

Python Type Hinting and Static Typing

The intersection of typechecking, typehinting, and compiler technologies in Python is explored through articles discussing the adoption of static typing in Python, the benefits of type hints for code readability and maintainability, and the use of static type checkers like Pyright and Mypy. The evolving landscape of Python as it incorporates more static typing features, such as type variables and typed dictionaries in Python 3.12, is also a key focus of the topic.

30-Days-Of-Python: Guide to Learning Python Programming Project

30 days of Python programming challenge is a step-by-step guide to learn the Python programming language in 30 days. This challenge may take more than100 days, follow your own pace. These videos may help too:

pyright: Static Type Checker for Python Project

Static Type Checker for Python

Python Is (Mostly) Made of Syntactic Sugar Article

“Programming languages are often made up of a (mostly) irreducible core, with lots of sugary constructs sprinkled on top—the syntactic sugar.” This article summarizes a lot of Brett Cannon’s recent work exploring just what is sugar in Python and what is fundamental.

Mojo, a Superset of Python Article

Mojo is a new programming language, which is a superset of Python. It aims to fix Python’s performance and deployment problems.

How to Use Type Hints for Multiple Return Types in Python Article

In this tutorial, you’ll learn to specify multiple return types using type hints in Python. You’ll cover working with one or several pieces of data, defining type aliases, and type checking with a third-party static type checker tool.

Untyped Python: The Python That Was Article

This post by Armin is an opinion piece about the changes to Python over the years, particularly typing, and how that relates to other languages.

Pros and Cons of Dynamic Languages Article

This conversation is around Luke Plant’s excellent article Python’s “Disappointing” Superpowers that describes specific uses of Python’s dynamic capabilities that wouldn’t be possible in a static typed language.

Python Developers Survey 2022 Results Article

Python 3.12: Static Typing Improvements Article

In this tutorial, you’ll see the new static typing features in Python 3.12. You’ll learn about the new syntax for type variables, making generics simpler to define. You’ll also see how @override lets you model inheritance and how you use typed dictionaries to annotate variable keyword arguments.

How to Annotate Methods That Return self Article

In this tutorial, you’ll learn how to use the Self type hint in Python to annotate methods that return an instance of their own class. You’ll gain hands-on experience with type hints and annotations of methods that return an instance of their class, making your code more readable and maintainable.

Why if TYPE_CHECKING? Article

“Typechecking is brittle yet important”, learn more about where it works and where it doesn’t and what that might mean for your code.

What’s the Zen of Python? Article

In this tutorial, you’ll be exploring the Zen of Python, a collection of nineteen guiding principles for writing idiomatic Python. You’ll find out how they originated and whether you should follow them. Along the way, you’ll uncover several inside jokes associated with this humorous poem.

Python Wins the NEC C&C Foundation Award Article

“Why Python Is Terrible” Article

Writing a C Compiler in 500 Lines of Python Article

This post details how to build a C compiler, step-by-step, using Python. A great intro to compilers. The target source is WASM, so learn a bit about that too.

Why Mojo? Article

“A backstory and rationale for why we created the Mojo language.”

Ideas: Syntactic Sugar to Encourage Use of Named Arguments Article

How Many Python Core Devs Use Typing? Article

“How many old-school Python developers use type annotations?” This article dives into projects written by past and present core Python developers to see how often they use annotations in the wild.

Idea: Return a NamedTuple Article

What’s the Coolest Thing You’ve Done With Python? Article

The Realest Python 😂 Article

Boring Python: Code Quality Article

How to build, deploy, and manage Python applications in as “boring” a way as possible in order to maximize stability and reliability. Also, read the Hacker News Discussion associated with the article.

Type-Hinting Dataframes Article

This article demonstrates complete DataFrame type-hinting in Python, now available with generically defined containers in StaticFrame 2. In addition to usage in static analysis (with Pyright and Mypy), these type hints can be validated at runtime with an included decorator.

Signed Distance Functions in 46 Lines of Python Article

A walkthrough of 46 lines of code that renders a 3D ASCII donut using signed distance functions.

Why Did Python Win? Article

The Protocol Class Article

typing.Protocol enables type checking in a Java-esque interface like mechanism. Using it, you can declare that a duck-typed class conform to a specific protocol. Read on for details.

Obfuscated Python Competition Submissions Open Article

Microfeatures I’d Like to See in More Languages Article

Some language features are intrinsic to the language, others are syntactic sugar that could easily be borrowed in other programming languages. This opinion piece from Hillel highlights some features from more obscure languages that should be stolen by the mainstream. Two Python features he’d like to see in more languages are chained evaluations (2 <= x < 10) and numbers with separators (1000000 == 1_000_000).

Type Hints: Passing Any for Unused Test Parameters Article

When you create a function to match an interface, it often needs to accept parameters that it doesn’t use. Once you introduce type hints, testing such functions can become a little irksome as Mypy requires all arguments to have the correct types. This article covers a technique to avoid that work.

Why Static Languages Suffer From Complexity Article

An extremely detailed, deep dive on how static type systems impact the consistency of languages. Hirrolot compares a variety of lesser known languages to see the consequences of their decisions. See also the associated Hacker News discussion.

Fighting With Python Type Hints Article

Miloslav wanted to properly type-hint a decorator. Turns out, it wasn’t the easiest thing to do. Read on for his solution.

Mojo: Head-to-Head With Python and Numba Article

This article covers a Mandelbrot-based benchmark of Python, variations of Numba, and the newly available Mojo. Although Mojo is fast it takes a lot more work than the author expected to translate Python to it, and with the right parameters Numba still beats it.

Running Untrusted Python Code Article

Andrew wanted to play with some untrusted Python. Read how he used seccomp and setrlimit to build a Python sandbox.

Python Type Hints: pyastgrep Case Study Article

Previously, Luke wrote an article about what was involved in adding Type Hints to parsy. This follow-on article tackles the effort on a project with different challenges: pyastgrep.

Why Python Keeps Growing Article

Python Is Two Languages Now, and That’s Actually Great Article

Python’s addition of typing has created “two” languages: typed and untyped Python. Tin tells you why that’s a great thing.

What Learning APL Taught Me About Python Article

Sometimes learning a new language provides perspective in the ones you already know. Rodrigo picked up APL, and this article discusses what that taught him about Python.

Gradual Soundness: Lessons From Static Python Article

A synopsis of a deep paper analyzing Static Python, a Python variant developed at Instagram to move from gradually-typed to statically-typed. Full paper available as PDF.

Functional Python, Part II: Dial M for Monoid Article

This article is about “commandeering techniques from richly typed, functional languages into Python for fun and profit.” The focus is on Typeclasses and continuation-passing style.

Three Python Trends in 2023 Article

An opinion piece on three trends likely to attract attention in the Python world in 2023: Python/Rust co-projects, web apps, and more typing. Read on for examples in each category.

Python Proposal (Inspired by Lua) Article

Elixir for Humans Who Know Python Article

Elixir is a functional based programming language with similarities to Ruby and Python. This article is an intro guide for programmers who know Python.

Why I’m Still Using Python Article

This opinion piece from Eric talks about how he started with Python and why he’s continued on the journey. There is also an associated Hacker News Discussion.

Why Type Hinting Sucks! Article

The Zen of Proverbs Article

Inspired by the Zen of Python and similar lists, this is list of Zen Proverbs for programming.

It Is Becoming Difficult for Me to Be Productive in Python Article

This discussion is based on Avinash’s article of the same name, where he describes his journey from type-less to typed languages and why he is finding it harder to refactor his Python.

Python Quirks Article

A straight-out list of code snippets showing off some of the weird and unexpected behavior of your favorite language.

Why Python Is Amazing Article

This opinion piece by Jos is a counter to the “its a terrible language” posts you come across once and a while. Read why Jos thinks Python is amazing.

2022 Real Python Tutorial & Video Course Wrap Up Article

“It’s been another year of changes at Real Python! The Real Python team has written, edited, curated, illustrated, and produced a mountain of Python material this year. We added some new members to the team, updated the site’s features, and created new styles of tutorials and video courses.”

The Contradictions in ‘The Zen of Python’ Article

This is a summary of Christopher Neugebauer’s talk at PyCascades reminding attendees how foolish consistency can be a hobgoblin to productivity.

Ode to Ptyon Article

A lighthearted poem about a certain well-known programming language.

Breaking the Snake: How Python Went From 2 to 3 Article

This discussion spawned from Diego Crespo’s article of the same name talks about the transition that somehow everyone is still interested in talking about.

python-skyfield: Elegant Astronomy for Python Project

Elegant astronomy for Python

CausalPy: Causal Inference in Quasi-Experimental Settings Project

A Python package for causal inference in quasi-experimental settings

tragic-methods: Collection of Programming Quirks Project Started in 2023

A collection of script depicting the strange quirks of programming languages.

symbex: Search Python for Symbols to Output to an LLM Project Started in 2023

Find the Python code for specified symbols