PythonHub
2.44K subscribers
2.35K photos
49.4K links
News & links about Python programming.
https://pythonhub.dev/
Download Telegram
Wrapping immutable objects

Graham Dumpleton explores how Python’s wrapt library must correctly handle immutable types when wrapping objects, highlighting hidden issues with in-place operators like += and @= when applied to proxies of immutables. He outlines a refinediaddstrategy for ObjectProxy that preserves expected behaviour in version 2.0.0 of wrapt.

https://grahamdumpleton.me/posts/2025/10/wrapping-immutable-types/