- Notifications
You must be signed in to change notification settings - Fork58
Replace sentinel value with an enumerator.#102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Looks like this would break backward compatibility. Are there any advantages besides the improved code completion? |
Better type hints than just integer was really what I was trying to achieved here. Of course that can be achieved with a literal type (Literal[1, 2]), but a enum makes a better connection between the sentinel value and their function, and gives better auto code completion, as you said. |
Issue type
Summary
Replace XML_PARSER_DOM and XML_PARSER_SAX with an enumerator.
If this is not a perfect use case for a enum class, I don't what is.