(Christopher Neugebauer) Python – like many languages – lets you do things that are completely inadvisable. Many of the features that (left unchecked) allow you to do inadvisable things were used to achieve things that have since become necessary and defining features of Python.
Python – unlike many languages – discovered that leaving these obvious and necessary features lying around next to inadvisable things was a bad idea, and built guardrails around them.
In real life, guardrails are structures that make it easier to understand how to be safe in an area where there is otherwise danger. If respected, guardrails make you safer, but unlike walls or fences, guardrails do not block you from danger.
In Python, features like decorators, context managers, async functions, importlib, and more are all guardrails that let you work with less-safe Python machinery from a much safer distance.
In this talk, we’re going to explore the idea of guardrails as a design philosophy, and use that to explain Python’s attitude to safely working with the language and its internals.
We’ll explore features of Python that are guardrails around less-safe features – what features they replaced, how those features could be used incorrectly, and how the newer features allow you to use Python more safely. As a special treat, you may also get to see how Python lets you abuse these features*.
We’ll conclude with a discussion of how you can use Python’s guardrail philosophy in your own code.
---
(* SKILLED OPERATOR ON CLOSED CIRCUIT; DO NOT ATTEMPT)
https://pretalx.com/pycon-au-2025/tal...
python, pycon, australia, programming, conference, technical, developers, panel, sessions, libraries, frameworks, community, sysadmins, students, education, data, science
Videos licensed as CC-BY-NC-SA 4.0
PyCon AU is the national conference for the Python programming community, bringing together professional, student and enthusiast developers, sysadmins and operations folk, students, educators, scientists, statisticians, and many others besides, all with a love for working with Python.
Licensed as CC BY-NC-SA - http://creativecommons.org/licenses/b...
Produced by Next Day Video Australia: https://nextdayvideo.com.au
Sat Sep 13 13:30:00 2025 at Ballroom 3
Информация по комментариям в разработке