Python Doesn't Round Numbers the Way You Might Think | Real Python Podcast

Published: 05 July 2024
on channel: Real Python
1,170
15

Does Python round numbers the same way you learned back in math class? You might be surprised by the default method Python uses and the variety of ways to round numbers in Python. Christopher Trudeau is back on the show this week, bringing another batch of PyCoder's Weekly articles and projects.

👉 Links from the show: https://realpython.com/podcasts/rpp/211/

Christopher discusses his recent video course, "Rounding Numbers in Python." He covers rounding bias and how to avoid introducing it into your dataset. We dig into the various rounding strategies and how to implement them in Python.

We also share several other articles and projects from the Python community, including a news roundup, a fast Python linter for error-free and maintainable code, the decline of the user interface, more thoughts on Python in Excel, a discussion about calendar versioning for Python, a financial database as a Python module, and a project to prettify the colors of your terminal user interfaces.

This episode is sponsored by Sentry.

Topics:

00:00:00 -- Introduction
00:02:06 -- NumPy 2.0.0 Release Notes
00:02:52 -- Python 3.13.0 beta 3 released
00:03:05 -- Announcing the PSF Board Candidates for 2024!
00:03:27 -- Prohibiting Outlook Email Domains
00:04:31 -- Ruff: A Python Linter for Error-Free and Maintainable Code
00:09:31 -- Sponsor: Sentry
00:10:35 -- The Decline of the User Interface
00:19:14 -- My Thoughts on Python in Excel
00:26:30 -- Rounding Numbers in Python
00:30:53 -- Video Course Spotlight
00:32:13 -- PEP 2026: Calendar Versioning for Python
00:42:37 -- Financial Database as a Python Module
00:45:34 -- prettypretty: Build Awesome Terminal User Interfaces
00:47:48 -- Thanks and goodbye

👉 Links from the show: https://realpython.com/podcasts/rpp/211/


Watch video Python Doesn't Round Numbers the Way You Might Think | Real Python Podcast online without registration, duration hours minute second in high quality. This video was added by user Real Python 05 July 2024, don't forget to share it with your friends and acquaintances, it has been viewed on our site 1,170 once and liked it 15 people.