Quantcast
Channel: Planet Python
Browsing all 22464 articles
Browse latest View live

"Morphex's Blogologue": A little sunday refactoring

Making a little progress in the ravencoin-taxman accounting script today, refactored date parsing into its own function in this...

View Article


Ned Batchelder: Adding a dunder to an object

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...

View Article


"Morphex's Blogologue": Comparing apples and oranges

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 given...

View Article

Glyph Lefkowitz: Dates And Times And Types

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 literal...

View Article

Luke Plant: 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...

View Article


Mike Driscoll: 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...

View Article

Python for Beginners: 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...

View Article

Real Python: A First Look at PyScript: Python in the Web 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...

View Article


Image may be NSFW.
Clik here to view.

Python Insider: Python 3.10.5 is available

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...

View Article


Image may be NSFW.
Clik here to view.

Python GUIs: Packaging PyQt6 applications into a macOS app with PyInstaller...

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 someone...

View Article

Image may be NSFW.
Clik here to view.

Python Software Foundation: Welcome Chloe Gerhardson to the PSF staff!

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...

View Article

Mike Driscoll: An Intro to Context Managers in Python (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...

View Article

Real Python: Write and Test a Python Function: Interview Practice

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,...

View Article


Glyph Lefkowitz: Dates And Times And Types

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 literal...

View Article

Read the Docs: Read the Docs 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 the...

View Article


Python Bytes: #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>...

View Article

Image may be NSFW.
Clik here to view.

PyCoder’s Weekly: Issue #528 (June 7, 2022)

#528 – JUNE 7, 2022View 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 confusing for...

View Article


Test and Code: 189: attrs and dataclasses - Hynek Schlawack

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,...

View Article

Mike Driscoll: 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 ArticlesPython's with Statement and Context...

View Article

Python for Beginners: 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...

View Article
Browsing all 22464 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>