‎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: 180

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...

Python Review · Membership, Logic, Walrus, Identity, Comparison Operators

Jan 23, 2016

Membership Checks if an element is in a container; in, not in. Logic Connects multiple Boolean conditions and evaluate the overall outcome; and, or, not. Logic Extended Performs 'bulk' logical checks, simplifying...

Python Review · Conditions, Loops, Context Managers

Jan 16, 2016

Conditional Statements if-elif-else: logical branching. Truthy Falsy Values if obj:, while executing it, Python evaluates the following internal logic: bool(): Python first calls for this method; if it exists, its return value...