When Is an Exception Not an Exception? Using Warnings in Python｜Reuven M. Lerner｜PyCon APAC 2022
Channel: PyCon Taiwan
Date: 2022-09-11

PyCon APAC 2022｜一般演講 Talks｜國泰金控 Cathay Financial Holdings / 美光科技 Micron 冠名贊助

✏️ 共筆 Note：https://hackmd.io/@pycontw/BkUzP6Xyj
🖐🏻 Slido：https://app.sli.do/event/4kNcBDETXQmm6Erje8Hjyp
💬 語言 Language：英文 English
🎯 層級 Level：中階 Intermediate
🔎 分類 Category：Python 核心 Python Core

💡 摘要 Abstract 💡
Python's warnings are exceptions — but they're also distinct from exceptions, and are both used and trapped differently. In this talk, I'll introduce warnings, how to raise, trap, and redirect them, and show you best practices for their use. Many experienced developers don't know that Python's warning system supports filtering and suppressing warnings quite flexibly, based on a variety of parameters. You can thus turn certain warnings into (potentially fatal) exceptions, or ignore them entirely -- or enjoy the default behavior, in which they appear on the screen. In addition to showing you how you can create and display warnings, I'll also show you how you can create your own, and (perhaps even more significantly) give examples of when they're appropriate.

🚀 關於講者 About Speaker - Reuven M. Lerner 🚀
Teaching Python and data science around the world since 1995. Author of the books "Python Workout" and "Pandas Workout". Publisher of the "Better developers" newsletter. I spend each day trying to help people improve their Python skills.

#python #pycontw #pyconapac2022 #exception #pythonwarning

Follow “PyCon Taiwan”
⭐️ Official Website: https://tw.pycon.org
⭐️ Facebook: https://www.facebook.com/pycontw
⭐️ Instagram: https://www.instagram.com/pycontw
⭐️ Twitter: https://twitter.com/PyConTW
⭐️ LinkedIn: https://www.linkedin.com/company/pycontw
⭐️ Blogger: https://pycontw.blogspot.com