Re:What Is the Switch-Case Equivalent in Python?
by dragonwriter on Sunday April 04, 2021 @04:58AM
(#26687917)
> it's only for specific classes, you cannot change the behavior of 1 == "one"
More clearly because builtins are protected from monkey-patching, you can’t change the behavior of == where both operands are builtins. “Only for specific classes” implies the scope of applicability is much narrower than it is.
More clearly because builtins are protected from monkey-patching, you can’t change the behavior of == where both operands are builtins. “Only for specific classes” implies the scope of applicability is much narrower than it is.