
Episode 157
Discussing Mojo & Improving Python Object-Oriented Programming
The Real Python Podcast · Real Python
May 26, 202354m 58s
Audio is streamed directly from the publisher (dts.podtrac.com) as published in their RSS feed. Play Podcasts does not host this file. Rights-holders can request removal through the copyright & takedown page.
Show Notes
<p>Would you like to speed up your Python machine-learning code dramatically? What if you only had to change a few keywords and add a couple of type hints on portions of your code? This week on the show, Christopher Trudeau is here, bringing another batch of PyCoder’s Weekly articles and projects.</p>
<p>We discuss a new programming language named Mojo, which is a superset of Python. It aims to fix Python’s performance and deployment problems. The project has many interesting ideas and a leader who has helped to shape modern compiler technology.</p>
<p>We also share a pair of Real Python tutorials from Leodanis Pozo Ramos about object-oriented programming in Python. The first one is a deep dive into the creation of classes. It’s an excellent refresher for anyone looking to hone their OOP skills in Python. </p>
<p>The second tutorial covers the SOLID principles, which are five well-established standards for improving your object-oriented design. These principles guide you to create object-oriented code that is more maintainable, extensible, scalable, and testable.</p>
<p>We cover several other articles and projects from the Python community, including a news update, showing warnings when running Django, tracking the progress of your Python program, and a Markdown browser for your terminal.</p>
<p>This week’s episode is brought to you by Koyeb.</p>
<div class="alert alert-primary" role="alert">
<p><strong>Course Spotlight:</strong> <a href="https://realpython.com/courses/knn-python/">Using k-Nearest Neighbors (kNN) in Python</a></p>
<p>In this video course, you’ll learn all about the k-nearest neighbors (kNN) algorithm in Python, including how to implement kNN from scratch. Once you understand how kNN works, you’ll use scikit-learn to facilitate your coding process.</p>
</div>
<p>Topics:</p>
<ul>
<li>00:00:00 – Introduction</li>
<li>00:02:39 – PEP 713: Callable Modules</li>
<li>00:04:22 – PEP 712: “Converter” Parameter for <code>dataclasses.field</code></li>
<li>00:06:49 – Python Classes: The Power of Object-Oriented Programming</li>
<li>00:16:44 – Sponsor: Koyeb</li>
<li>00:17:33 – SOLID Principles: Improve Object-Oriented Design in Python</li>
<li>00:22:00 – Mojo, a Superset of Python</li>
<li>00:34:31 – Mojo might be the biggest thing to happen in programming for decades</li>
<li>00:41:48 – Mojo – a new programming language for AI developers </li>
<li>00:44:03 – Video Course Spotlight</li>
<li>00:45:23 – Have Python Show Warnings When Running Django</li>
<li>00:47:52 – TQDM: Tracking the Progress of Your Python Program</li>
<li>00:50:34 – frogmouth: A Markdown Browser for Your Terminal</li>
<li>00:53:59 – Thanks and goodbye</li>
</ul>
<p>News:</p>
<ul>
<li><a href="https://peps.python.org/pep-0713/">PEP 713: Callable Modules</a></li>
<li><a href="https://peps.python.org/pep-0712/">PEP 712: “Converter” Parameter for <code>dataclasses.field</code></a></li>
</ul>
<p>Show Links:</p>
<ul>
<li><a href="https://realpython.com/python-classes/">Python Classes: The Power of Object-Oriented Programming</a> – In this tutorial, you’ll learn how to create and use full-featured classes in your Python code. Classes provide a great way to solve complex programming problems by approaching them through models that represent real-world objects.</li>
<li><a href="https://realpython.com/solid-principles-python/">SOLID Principles: Improve Object-Oriented Design in Python</a> – In this tutorial, you’ll learn about the SOLID principles, which are five well-established standards for improving your object-oriented design in Python. By applying these principles, you can create object-oriented code that is more maintainable, extensible, scalable, and testable.</li>
<li><a href="https://www.fast.ai/posts/2023-05-03-mojo-launch.html">Mojo, a Superset of Python</a> – <a href="https://docs.modular.com/mojo/">Mojo</a> is a new programming language, which is a superset of Python. It aims to fix Python’s performance and deployment problems.</li>
<li><a href="https://www.untangled.dev/2023/04/26/py-django-warnings/">Have Python Show Warnings When Running Django</a> – How to show warnings when running Python, and Django, during local development. The easy, yet not well-known, way.</li>
</ul>
<p>Discussion:</p>
<ul>
<li><a href="https://news.ycombinator.com/item?id=35809658">Mojo might be the biggest thing to happen in programming for decades - Hacker News</a></li>
<li><a href="https://news.ycombinator.com/item?id=35790367">Mojo, a new programming language for AI developers - Hacker News</a></li>
</ul>
<p>Projects:</p>
<ul>
<li><a href="https://coderslegacy.com/tqdm-tracking-the-progress-of-your-python-program/">TQDM: Tracking the Progress of Your Python Program</a></li>
<li><a href="https://github.com/Textualize/frogmouth">frogmouth: A Markdown Browser for Your Terminal</a></li>
</ul>
<p>Additional Links:</p>
<ul>
<li><a href="https://tqdm.github.io/presentation-%28pydata%29/video/">Video - tqdm documentation</a></li>
<li><a href="https://tqdm.github.io/">tqdm documentation</a></li>
<li><a href="https://pypa.github.io/pipx/">pipx</a></li>
<li><a href="https://realpython.com/podcasts/rpp/101/">Episode #101: Tools for Setting Up Python on a New Machine – The Real Python Podcast</a></li>
</ul>
<p>Level up your Python skills with our expert-led courses:</p>
<ul>
<li><a href="https://realpython.com/courses/using-jupyter-notebooks/">Using Jupyter Notebooks</a></li>
<li><a href="https://realpython.com/courses/knn-python/">Using k-Nearest Neighbors (kNN) in Python</a></li>
<li><a href="https://realpython.com/courses/multiple-constructors-python/">Using Multiple Constructors in Your Python Classes</a></li>
</ul> <p><a rel="payment" href="https://realpython.com/join">Support the podcast & join our community of Pythonistas</a></p>