Allow automatic naming of sentinels within classes
Discussions on Python.org
Allow automatic naming of sentinels within classes
In 3.15, this is the way to define a sentinel within a class (example from the documentation): class Cls: PICKLABLE = sentinel("Cls.PICKLABLE") I am personally averse to the common antipattern in Python of: value = some_function('value', ...) …where “value” must appear both as the assignment left-hand side and as an argument string. It feels repetitious and, while not especially error-prone, when there is an error it’s hard to diagnose. In this specific case things are complicated by nee...
0 comments
No comments yet.