Python’s raise: Effectively Raising Exceptions in Your Code

In your Python journey, you’ll come across situations where you need to signal that something is going wrong in your code. For example, maybe a file doesn’t exist, a network or database connection fails, or your code gets invalid input. A common approach to tackle these issues is to raise an exception, notifying the user that an error has occurred. That’s what Python’s raise statement is for. Learning about the raise statement allows you to effectively handle errors and exceptional […]

Read more

How to Make Engaging Programming Videos

Programming videos have become an increasingly popular medium for sharing knowledge and helping the fellow developers on your team. Especially when you’re working remotely, effective communication is vital, and screencasts have emerged as a powerful tool that meets this need. That’s why knowing how to make programming videos is a valuable skill, no matter where you are in your career. Even if you’ve never considered creating video content yourself, creating a screencast can be a great way to enhance written […]

Read more

Python Basics: Reading and Writing Files

Files are everywhere in the modern world. They’re the medium in which data is digitally stored and transferred. Chances are, you’ve opened dozens, if not hundreds, of files just today! Now it’s time to read and write files with Python. In this video course, you’ll learn how to: Understand the difference between text and binary files Learn about character encodings and line endings Work with file objects in Python Read and write character data in various file modes Use open(), […]

Read more

Python News: What’s New From May 2023

May 2023 was an important month for Python, as the upcoming Python 3.12 version is now feature complete. You can dig into a lot of information about Python and its development by reading the coverage of the Language Summit and watching videos from PyCon US. Modular has announced a new programming language that’s based on Python. Grab a cup of your favorite beverage and sit down with the most important Python news from the last month. Python 3.12 in Beta […]

Read more

Understanding CPUs can help speed up Numba and NumPy code

When you need to speed up your NumPy processing—or just reduce your memory usage—the Numba just-in-time compiler is a great tool. It lets you write Python code that gets compiled at runtime to machine code, allowing you to get the kind of speed improvements you’d get from languages like C, Fortran, or Rust. Or at least, that’s the theory. In practice, your initial Numba code may be no faster than the NumPy equivalent. But you can do better, once you […]

Read more
1 93 94 95 96 97 913