Created
May 14, 2024 16:55
-
-
Save mypy-play/523713f57cc341de1593dca3b96658df to your computer and use it in GitHub Desktop.
Shared via mypy Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from enum import Enum | |
class MyStrEnum(str, Enum): | |
A = "a" # ok | |
B = b"b", "utf-8" # ok, see the typeshed definition of `str.__new__` | |
C = "too", "many", "arguments", "provided" # runtime error: TypeError: str() takes at most 3 arguments (4 given) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment