Python
Write reliable Python avoiding mutable defaults, import traps, and common runtime surprises.
New
Join 0+ developers using this skill
skill
Development & Code Tools
intermediate
0 installs
Write reliable Python avoiding mutable defaults, import traps, and common runtime surprises.
Real data. Real impact.
Emerging
Developers
Per week
Open source
Skills give you superpowers. Install in 30 seconds.
| Topic | File |
|---|---|
| Dynamic typing, type hints, duck typing | |
| List/dict/set gotchas, comprehensions | |
| Args/kwargs, closures, decorators, generators | |
| Inheritance, descriptors, metaclasses | |
| GIL, threading, asyncio, multiprocessing | |
| Circular imports, packages, init.py | |
| Pytest, mocking, fixtures | |
def f(items=[]) shares list across all calls — use items=None then items = items or []is checks identity, == checks equality — "a" * 100 is "a" * 100 may be Falsefor x in list(items):except: catches SystemExit and KeyboardInterrupt — use except Exception:UnboundLocalError when assigning to outer scope variable — use nonlocal or globalopen() without context manager leaks handles — always use with open():0.1 + 0.2 != 0.3 — floating point, use decimal.Decimal for moneyitertools.tee__init__ instead__init__ is not constructor — __new__ creates instance, __init__ initializesencoding='utf-8'No automatic installation available. Please visit the source repository for installation instructions.
View Installation Instructions1,500+ AI skills, agents & workflows. Install in 30 seconds. Part of the Torly.ai family.
© 2026 Torly.ai. All rights reserved.