Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 2.24 KB

File metadata and controls

39 lines (32 loc) · 2.24 KB

Decorator — where it lives outside this repo

Cited, real implementations to study (or point an agent at) when designing or reviewing decorator-shaped code.

Python standard library

Major ecosystems

What to notice across all of them

Every one preserves the wrapped callable's contract (arguments in, result out) and adds exactly one concern beside it. And every serious one calls functools.wraps — check for it first when reviewing any hand-rolled decorator.