Planet Python RSS
214 subscribers
17K links
Unofficial Planet Python RSS feed from planetpython.org. Maintained by @cfinnberg
Download Telegram
Armin Ronacher: Rust Any Part 2/: As-Any Hack

Link: http://lucumr.pocoo.org/2022/1/7/as-any-hack


System Message: WARNING/2 (<string>, line 2)
Title underline too short.

Rust Any Part 2/: As-Any Hack
============================


Yesterday I wrote about how to use the
Any type in Rust to implem
ItsMyCode: Python String swapcase()

Link: https://itsmycode.com/python-string-swapcase/

ItsMyCode |
Python string swapcase() method is a built-in function that converts all uppercase characters into lowercase and all lowercase characters into uppercase characters of a given string and re
Talk Python to Me: #347: Cinder - Specialized Python that Flies

Link: https://talkpython.fm/episodes/show/347/cinder-specialized-python-that-flies

The team at Instagram dropped a performance bomb on the Python world when they open-sourced Cider, their performance oriented fork of CPython. It contains a number of performance optimizations, includ
Brett Cannon: Unravelling `from` for `raise` statements

Link: https://snarky.ca/unravelling-from/

As part of my series on Python&aposs syntax, I want to tackle the from clause for raise statements. In case you&aposre unfamiliar, raise A from B causes B to be assigned to A.__cause__ which lets chai
ItsMyCode: TypeError: list indices must be integers or slices, not str

Link: https://itsmycode.com/typeerror-list-indices-must-be-integers-or-slices-not-str/

ItsMyCode |
If you are accessing the elements of a list in Python, you need to access it using its index position or slices. However, if you try to access a list value using a string Python will raise
Juri Pakaste: Async Swift and ArgumentParser

Link: https://juripakaste.fi/async-argumentparser/

Swift 5.5 brought us async functions. ArgumentParser is the most popular way
to write command line interfaces with Swift. Swift 5.5 supports an asynchronous main
function, but ArgumentParser does not,
ItsMyCode: [Solved] Python can’t Multiply Sequence by non-int of type ‘str’

Link: https://itsmycode.com/solved-python-cant-multiply-sequence-by-non-int-of-type-str/

ItsMyCode |
The TypeError: can’t multiply sequence by non-int of type ‘str’ occurs if we multiply a string by another string without converting into an integer or floating-point.
In this tutorial, we
ItsMyCode: [Solved] Python can’t Multiply Sequence by non-int of type ‘float’

Link: https://itsmycode.com/solved-python-cant-multiply-sequence-by-non-int-of-type-float/

ItsMyCode |
The TypeError: can’t multiply sequence by non-int of type ‘float’ occurs if we use the multiply operator between a string and float value. 
In this tutorial, we will learn what exactly Typ
ItsMyCode: No handles with labels found to put in legend

Link: https://itsmycode.com/no-handles-with-labels-found-to-put-in-legend/

ItsMyCode |
In Python matplotlib No handles with labels found to put in legend occur if you have not defined the label parameters whenever you plot the figure and try to call the plt.legend() method.
ItsMyCode: ValueError: If using all scalar values, you must pass an index

Link: https://itsmycode.com/valueerror-if-using-all-scalar-values-you-must-pass-an-index/

ItsMyCode |
If you pass all scalar values while creating pandas Dataframe in Python, you will encounter “ValueError: If using all scalar values, you must pass an index“
In this tutorial, we will learn
ItsMyCode: [Solved] NameError: name ‘np’ is not defined

Link: https://itsmycode.com/solved-nameerror-name-np-is-not-defined/

ItsMyCode |
In Python,  NameError: name ‘np’ is not defined occurs when you import the NumPy library but fail to provide the alias as np while importing it.
In this article, let us look at what is Na
ItsMyCode: [Solved] NameError: name ‘pd’ is not defined

Link: https://itsmycode.com/solved-nameerror-name-pd-is-not-defined/

ItsMyCode |
In Python,  NameError: name ‘pd’ is not defined occurs when you import the pandas library but fail to provide the alias as pd while importing it.
In this article, let us look at what is N
Armin Ronacher: Dependency Risk and Funding

Link: http://lucumr.pocoo.org/2022/1/10/dependency-risk-and-funding

I have a love/hate relationship with dependencies. I wrote about this
extensively on this blog. Once about the challenges with scaling trust
in dependencies and earlier about the
problem with micro
ItsMyCode: How to Fix: KeyError in Pandas?

Link: https://itsmycode.com/how-to-fix-keyerror-in-pandas/

ItsMyCode |
The KeyError in Padas occurs when you try to access the columns in pandas DataFrame, which does not exist, or you misspell them. 
Typically, we import data from the excel name, which impor
Zato Blog: API development workflow with Zato

Link: https://zato.io/blog/posts/zato-dev-workflow.html

Zato is an integration platform and backend application server which means that, during most of their
projects, developers using Zato are interested in a few specific matters.
The platform concentrate
Mike Driscoll: PyDev of the Week: Lais Carvalho

Link: https://www.blog.pythonlibrary.org/2022/01/10/pydev-of-the-week-lais-carvalho/

This week we welcome Lais Carvalho (@lais_bsc) as our PyDev of the Week! Lais is active in multiple Python user groups in Ireland and has helped organize multiple Python conferences. She is on a recen
ItsMyCode: How to Fix in Python ValueError: Trailing data?

Link: https://itsmycode.com/how-to-fix-in-python-valueerror-trailing-data/

ItsMyCode |
In Python ValueError: Trailing data occurs when you try to load the JSON data or file into pandas DataFrame, and the data is written in lines separated with newline characters such as ‘\n’
Real Python: Build and Handle POST Requests in Django – Part 3

Link: https://realpython.com/django-social-post-3/

In this four-part tutorial series, you’re building a social network with Django that you can showcase in your portfolio. This project is strengthening and demonstrating your understanding of relations