‎Check network for missing images.

A collection of study notes, ideas, experiments, and some fragments of life, presented in the form of a website.

科技 生活 世界 随手记两笔
Tags: 11
Posts: 182

Python Review · Exceptions, Logging, Unittest

Feb 27, 2016

Concepts EAFP - Easier to Ask for Forgiveness than Permission: A coding style that assumes valid inputs and successful operations, handling potential errors through try...except blocks only after they occur. LBYL -...

Python Review · Object Oriented Programming

Feb 20, 2016

Basics Class: A blueprint or template that defines the structure of properties (data) and methods (behaviors) that all objects of its type will possess. Object: A specific instance created from a class,...

Python Review · Functions

Feb 13, 2016

Definitions Basics: the def keyword, docstring, arguments, and return. Typed Hints: defined with type hints (soft suggestions) for arguments and return, enhancing readability and allowing static analysis. Typed Checks: defined with type...

Python Review · Unpacking, Structural Matching, Packing

Feb 6, 2016

Unpacking var: positional, strictly based on position, 1-to-1 matching. _: placeholder, holds a places and ignores the value to satisfy syntax requirements, 1-to-1 matching. *foo: catch-all, catches the rest of the values...

Python Review · Iterators, Generators, Comprehensions, Iterable, Hashable

Jan 30, 2016

Iterators An object that represents a stream of data. It fetches one element at a time using the __next__() method and maintains its internal state to know "what's next." range: generates a...