Python Morsels: Multiline comments in Python
Planet Python
by
20m ago
Python does not have multiline comments. But you can use alternatives like docstrings, editor shortcuts, and conventional commenting methods, depending on your requirements. Table of contents Does Python have multi-line comments? What about triple quotes? Docstrings versus comments What if I want to comment-out a whole block of code? How to comment multiple lines Use docstrings, your code editor, or version control Does Python have multi-line comments? For single-line comments, Python uses the octothorpe character (#), also known as pound, number sign, crunch, and of course, the hashtag ch ..read more
Visit website
Talk Python to Me: #457: Software Supply Chain Security with Phylum
Planet Python
by
20m ago
We've spoken previously about security and software supply chains and we are back at it this episode. We're diving in again with Charles Coggins. Charles works at a software supply chain company and is on to give us the insiders and defender's perspective on how to keep our Python apps and infrastructure safe.<br/> <br/> <strong>Episode sponsors</strong><br/> <br/> <a href='https://talkpython.fm/sentry'>Sentry Error Monitoring, Code TALKPYTHON</a><br> <a href='https://talkpython.fm/mailtrap'>Mailtrap</a><br> <a href='ht ..read more
Visit website
Real Python: The Real Python Podcast – Episode #201: Decoupling Systems to Get Closer to the Data
Planet Python
by
15h ago
What are the benefits of using a decoupled data processing system? How do you write reusable queries for a variety of backend data platforms? This week on the show, Phillip Cloud, the lead maintainer of Ibis, will discuss this portable Python dataframe library. [ Improve Your Python With ? Python Tricks ? – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ..read more
Visit website
Real Python: Write Pythonic and Clean Code With namedtuple
Planet Python
by
15h ago
In this quiz, you’ll test your understanding of Python’s namedtuple(). By working through this quiz, you’ll revisit how to create namedtuple classes, identify and take advantage of the cool features of namedtuple, use namedtuple instances to write Pythonic code, and decide when to use a namedtuple over a similar data structure. [ Improve Your Python With ? Python Tricks ? – Get a short & sweet Python Trick delivered to your inbox every couple of days. >> Click here to learn more and see examples ..read more
Visit website
Real Python: Format Floats Within F-Strings
Planet Python
by
15h ago
In this quiz, you’ll test your understanding of How to Format Floats Within F-Strings in Python. You’ll often need to format and round a Python float to display the results of your calculations neatly within strings. While there are several ways to format numbers in Python, formatted string literals or f-strings are usually the most frequent choice in modern Python programs. Knowing how to use f-strings effectively can make your code more readable and concise. [ Improve Your Python With ? Python Tricks ? – Get a short & sweet Python Trick delivered to your inbox every couple of days. > ..read more
Visit website
Test and Code: 218: Balancing test coverage with test costs - Nicole Tietz-Sokolskaya
Planet Python
by
2d ago
Nicole is a software engineer and writer, and recently wrote about the trade-offs we make when deciding which tests to write and how much testing is enough. We talk about: Balancing schedule vs testing How much testing is the right about of testing Should code coverage be measured and tracked Good refactoring can reduce code coverage Is it worth testing error conditions? Are rare error codes ok to just monitor? API drift and autospec Mitigating risk Deciding what to test and what not to test Focus testing on key money-making features  If there's a bug in this part of the code, how much b ..read more
Visit website
Seth Michael Larson: Microsoft supports urllib3 with FOSS Fund 2024
Planet Python
by
2d ago
Microsoft supports urllib3 with FOSS Fund 2024 About • Blog • Newsletter • Links Microsoft supports urllib3 with FOSS Fund 2024 Published 2024-04-17 by Seth Larson Reading time: minutes Back in January we announced that urllib3 would be fundraising to implement support for HTTP/2 in a backwards compatible way to urllib3 v2.x and to ensure the project's development remains sustainable in the long-term. Microsoft has awarded urllib3 $5,000 USD as one of its FOSS Fund recipients for 2024 ? Thank you, Microsoft for supporting open source software! Since announcing our fundraiser we have rai ..read more
Visit website
Tryton News: Security Release for issue #13142
Planet Python
by
3d ago
Cédric Krier has found that trytond accepts compressed content from unauthenticated requests which makes it vulnerable to zip bomb attacks. Impact CVSS v3.0 Base Score: 5.3 Attack Vector: Network Attack Complexity: Low Privileges Required: None User Interaction: None Scope: Unchanged Confidentiality: None Integrity: None Availability: Low Workaround A proxy can be deployed in front of the trytond server to forbid this kind of request. Resolution All affected users should upgrade trytond to the latest version. Affected versions per series: trytond: 7.0: <= 7.0.9 6.8: <= 6.8.14 6.0: &l ..read more
Visit website
Mike Driscoll: Announcing The Python Logging Book & Course Kickstarter
Planet Python
by
3d ago
What does every new developer do when they are first learning to program? They print out strings to their terminal. It’s how we learn! But printing out to the terminal isn’t what you do with most professional applications. Support on Kickstarter  In those cases, you log into files. Sometimes, you log into multiple locations at once. These logs may serve as an audit trail for compliance purposes or help the engineers debug what went wrong. Python Logging teaches you how to log in the Python programming language. Python is one of the most popular programming languages in the world. Python ..read more
Visit website
Real Python: How to Format Floats Within F-Strings in Python
Planet Python
by
3d ago
You’ll often need to format and round a Python float to display the results of your calculations neatly within strings. In earlier versions of Python, this was a messy thing to do because you needed to round your numbers first and then use either string concatenation or the old string formatting technique to do this for you. Since Python 3.6, the literal string interpolation, more commonly known as a formatted string literal or f-string, allows you to customize the content of your strings in a more readable way. An f-string is a literal string prefixed with a lowercase or uppercase letter f a ..read more
Visit website

Follow Planet Python on FeedSpot

Continue with Google
Continue with Apple
OR