Python Decorators and Descriptors
Implementation-focused notes on Python function and class decorators, descriptor protocols, and common usage patterns.
23 posts, newest first.
Implementation-focused notes on Python function and class decorators, descriptor protocols, and common usage patterns.
Python socket notes covering connection identity, listen queues, SO_REUSEADDR, TCP framing, and related API behavior.
A GitPython-based approach for detecting the active branch and loading its matching Django settings automatically.
A refined SegmentFault backup implementation that traces redirects and cookies to replace browser automation with requests.Session.
Why Python 2 multiprocessing pools can ignore Ctrl+C, with working and non-working ways to stop worker processes.
An investigation of SegmentFault authentication followed by a Python article-backup tool using Selenium, PhantomJS, and Tornado.
A Python 2 guide to source encodings, Unicode and UTF-8 conversion, encode and decode, and terminal behavior.
An exploration of Python multiple inheritance through MRO, C3 linearization, diamond hierarchies, and super calls.