Exception Handling in Python: Catch Narrowly, Log Everything
Exception handling in Python done properly: try, except, else and finally, custom exceptions, chaining and logging, and why a bare except can break Ctrl-C.
Search
14 articles matched your search.
Exception handling in Python done properly: try, except, else and finally, custom exceptions, chaining and logging, and why a bare except can break Ctrl-C.
Regular expressions in Python from the ground up: raw strings, core syntax, match vs search vs fullmatch, flags, and five mistakes that silently break patterns.
Iterators and generators in Python explained: yield, pipelines that stream big files in flat memory, itertools, and why a generator silently runs only once.
Python operators explained with outputs for every example, plus why is works for 256 but fails for 257 and why and/or rarely return booleans.
Python classes and objects explained with tested code: __init__, self, dunder methods, properties and dataclasses, plus the shared-list bug to learn first.
Inheritance and composition in Python with tested code: when to use each, how super() really works, duck typing, and why deep class hierarchies backfire.
Python numeric data types explained: int, float, Decimal, Fraction and complex, why 0.1 + 0.2 is not 0.3, and how to handle money without rounding errors.
How to switch to tech at 30 or later with a job, a mortgage and eight usable hours a week: adjacent roles, a realistic timeline and what the data shows.
AI vs machine learning vs deep learning, plus data science: how the four terms nest, one problem solved four ways, and when deep learning is worth using.
Is a full stack AI course worth it? A 20-job-posting test for breadth versus depth, the layer most syllabi rush, and five programmes compared on price.
Programming for data science: how much SQL and Python you need, what reproducible code looks like, the notebook traps, and where AI assistants help or hurt.
How to use Python tuples well: creating them, unpacking, using them as dict keys, named tuples, and the one-element and += gotchas that catch everybody.
How to write Python functions: arguments, defaults, *args and **kwargs, scope, type hints and docstrings, plus the mutable default bug everyone hits once.
Python basics with runnable examples: names and objects, lists, dicts and sets, control flow and comprehensions, plus the traps behind most beginner bugs.