Planet Python RSS
217 subscribers
16.9K links
Unofficial Planet Python RSS feed from planetpython.org. Maintained by @cfinnberg
Download Telegram
Ned Batchelder: Adding a dunder to an object

Link: https://nedbatchelder.com/blog/202206/adding_a_dunder_to_an_object.html

We had a tricky debugging need at work: we wanted to track how an attribute
on an object was changing. Here’s the unusual solution we used.The __setattr__ special method (dunder) is called when an at
"Morphex's Blogologue": Comparing apples and oranges

Link: http://blogologue.com/blog_entry?id=1654451211X55

So finally for this sunday hacking, I added some tests for the ravencoin-taxman project, and before that, I added RVN-USD calculation for transactions; giving (an acceptable) USD valuation of any give
Glyph Lefkowitz: Dates And Times And Types

Link: https://glyph.twistedmatrix.com/2022/06/dates-and-times-and-types.html

Python’s standard
datetime
module is very powerful. However, it has a couple of annoying flaws.
Firstly, datetimes are considered a kind of
date1, which causes problems.
Although datetime is a litera
Mike Driscoll: PyDev of the Week: Denny Perez

Link: https://www.blog.pythonlibrary.org/2022/06/06/pydev-of-the-week-denny-perez/

This week we welcome Denny Perez (@dennyperez18) as our PyDev of the Week! Denny works at nventive and is very active in the Python community, including helping to organize PyCon itself. You can see w
Python for Beginners: Convert a List of Strings to Ints in Python

Link: https://www.pythonforbeginners.com/basics/convert-a-list-of-strings-to-ints-in-python

In python, we use lists to store different elements. In this article, we will discuss different ways to convert a list of strings to ints. We will also discuss how we can convert a list of lists of st
Luke Plant: Raising exceptions or returning error objects in Python

Link: https://lukeplant.me.uk/blog/posts/raising-exceptions-or-returning-error-objects-in-python/

The other day I got a question about some old code I had written which, instead
of raising an exception for an error condition as the reader expected, returned
an error object:

With your EmailVerifyT
Real Python: A First Look at PyScript: Python in the Web Browser

Link: https://realpython.com/pyscript-python-in-browser/

PyScript is a brand-new framework that caused a lot of excitement when Peter Wang, the CEO and co-founder of Anaconda, Inc., revealed it during his keynote speech at PyCon US 2022. Although this proje
Python Insider: Python 3.10.5 is available

Link: https://pythoninsider.blogspot.com/2022/06/python-3105-is-available_6.html

The latest bugfix drop for Python 3.10 is here: Python 3.10.5. This release packs more than 230 bugfixes and docs changes, so you surely want to update :) You can get it here:https://www.python.org/do
Python GUIs: Packaging PyQt6 applications into a macOS app with PyInstaller (updated for 2022)

Link: https://www.pythonguis.com/tutorials/packaging-pyqt6-applications-pyinstaller-macos-dmg/

There is not much fun in creating your own desktop applications if you can't share them with other people — whether than means publishing it commercially, sharing it online or just giving it to someon
Mike Driscoll: An Intro to Context Managers in Python (Video)

Link: https://www.blog.pythonlibrary.org/2022/06/07/an-intro-to-context-managers-video/

Context managers are a handy way to open and close files, dialogs, thread-locks and so much more! Check out this short tutorial that introduces you to the concepts of context managers by Mike Driscoll
Python Software Foundation: Welcome Chloe Gerhardson to the PSF staff!

Link: http://pyfound.blogspot.com/2022/06/welcome-chloe-gerhardson-to-psf-staff.html

With great anticipation and excitement we are happy to announce that Chloe Gerhardson (she/her) has joined the Python Software Foundation (PSF) as of Monday May 23, 2022. Chloe joins the team as Infra
Real Python: Write and Test a Python Function: Interview Practice

Link: https://realpython.com/courses/interview-practice-python-function/

Whether you’re looking to ace your coding interview or simply to level up your development skills, solving coding challenges can help you grow as a programmer. In this Real Python Code Conversation, P
Read the Docs: Read the Docs newsletter - June 2022

Link: https://blog.readthedocs.com/newsletter-june-2022/


We’re excited to welcome Benjamin Balder Bach to our team,
joining as a part-time contractor for now.
He’s a developer with a history of working as an Open Source maintainer and event organizer in th
PyCoder’s Weekly: Issue #528 (June 7, 2022)

Link: https://pycoders.com/issues/528

#528 – JUNE 7, 2022 View in Browser » Django Static Files and Templates “Static files like CSS, JavaScript, and fonts are a core piece of any modern web application. They are also typically conf
Glyph Lefkowitz: Dates And Times And Types

Link: https://blog.glyph.im/2022/06/dates-and-times-and-types.html

Python’s standard
datetime
module is very powerful. However, it has a couple of annoying flaws.
Firstly, datetimes are considered a kind of
date1, which causes problems.
Although datetime is a litera
Python Bytes: #287 Surprising ways to use Jupyter Notebooks

Link: https://pythonbytes.fm/episodes/show/287/surprising-ways-to-use-jupyter-notebooks

<p><strong>Watch the live stream:</strong></p>

<a href='https://www.youtube.com/watch?v=QwKCZ44j9b4' style='font-weight: bold;'>Watch on YouTube</a><br>
<br>

<p><strong>About the show</strong></p>
Test and Code: 189: attrs and dataclasses - Hynek Schlawack

Link: https://testandcode.com/189

In Python, before dataclasses, we had attrs.
Before attrs, it wasn't pretty.
The story of attrs and dataclasses is actually intertwined.
They've built on each other.
And in the middle of it all, Hyne
Mike Driscoll: An Intro to the contextlib Module in Python (Video)

Link: https://www.blog.pythonlibrary.org/2022/06/08/an-intro-to-the-contextlib-module-in-python-video/

Learn how to create different types of context managers using Python's contextlib module!
You can learn more in the contextlib documentation.

Related Articles

Python's with Statement and Context Man
Python for Beginners: Check if a Key Exists in a Dictionary in Python

Link: https://www.pythonforbeginners.com/basics/check-if-a-key-exists-in-a-dictionary-in-python

We use python dictionaries to store key-value pairs. Sometimes, we need to check if a key exists in the dictionary or not. In this python tutorial, we will discuss different ways with working examples
Go Deh: Python: Yield the first item of consecutive series of equal items, from an iterable.

Link: http://paddy3118.blogspot.com/2022/06/python-yield-first-item-of-consecutive.html

 I was reading the source to the more_itertools.unique_unseen function. The function takes an iterator that may have regions where successive items are the same, and yields the item if next item is no
Nicola Iarocci: Eve 2.0 released

Link: https://nicolaiarocci.com/eve-2.0-released/

It’s been a long time coming, but I’m glad to announce that Eve 2 has finally been released today. This release drops support for Python 2, Python 3.5 and Python 3.6 hence the major version bump. Othe