Settings

Theme

PEP 591 – Adding a final qualifier to typing

python.org

2 points by lunchladydoris 6 years ago · 1 comment

Reader

ktpsns 6 years ago

I don't like final. If I do, I don't do crazy subclassing and monkey-patching for fun but to achieve something in a restricted environment, for instance because I cannot use the latest version of the patched library.

Python excels at this kind of code patching and introspection. Even "private" methods can be called or overwritten. That's good. Adding @final only makes it harder to deactivate this flag before applying some "runtime patch".

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection