Python Updates: Future Features, Packaging, and Tips

·32m 43s
Shared point

Introduction: Life in Unusual Times

The hosts and guest discuss working through the current global climate. While work life for software developers remains relatively stable, there is a clear impact on the broader community and industry, leading to a thoughtful discussion on resilience and the shift toward virtual training and remote work.

Python 3.9 Developments

Excitement builds for the upcoming release of Python 3.9. A key update discussed is PEP 584, which introduces new union operators for dictionaries.
• New | (pipe) operator simplifies merging two dictionaries.
• The pipe operator is used for both merging (a | b) and updating (a |= b).
• The community notes that while this is a welcomed cleaner syntax, designers must be aware that the right-side dictionary takes precedence in case of key overlaps.

String Optimization and Libraries

A new, experimental library called super string is introduced, aimed at optimizing memory usage and performance.

"Using a 20th of the amount of memory would be awesome, even in places like Pandas, NLP as well."

• It utilizes a rope data structure for improved performance in specific string operations.
• While the current API is limited, it demonstrates potential for applications dealing with large-scale string manipulation.
• The guest points out the importance of including comprehensive tests for any new library to ensure reliability and adoption.

The New Pip Resolver

The Python Packaging Authority is making significant strides in improving the pip experience.
• A new, stricter pip resolver is scheduled for release late in the year to enforce environmental consistency.
• It will prevent the installation of packages that have mutually inconsistent dependencies, reducing the chance of runtime errors caused by conflicting versions.
• Users are encouraged to run pip check to identify potential issues in their current environments early.

Modeling and Community Action

In uncertain times, programmers are finding ways to contribute by applying data science to local statistics.
• The discussion highlights the use of the SIR (Susceptible, Infected, Recovered) model within the epidemiological field.
• The guest explains that ordinary differential equations are often the correct mathematical tool for modeling growth, rather than forcing standard machine learning algorithms onto limited datasets.

Philosophy: The all() Function

A humorous yet philosophical segment explores why all() returns True for an empty iterable.
• This is a classic example of predicate logic, where the statement is considered vacuously true because there are no elements to invalidate the condition.
• It serves as a reminder to always check the official documentation for language behavior quirks.

Tool Spotlight: PyTest Monitor

Developed by Jean-Sebastien Douai, this tool helps developers track performance metrics.
PyTest Monitor automatically collects memory, CPU, and timing data into a SQLite database during test runs.
• It provides valuable insights into performance bottlenecks, although users noted a need for better built-in reporting tools.

Topics

Chapters

8 chapters
Python Bytes
AI chat — answers grounded in episodes