We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A past version of this PEP allowed type checkers to assume an optional type when the default value is None, as in this code: def handle_employee(e: Employee = None): ... This would have been treated as equivalent to: def handle_employee(e: Optional[Employee] = None) -> None: ... This is no longer the recommended behavior. Type checkers should move towards requiring the optional type to be made explicit.
A past version of this PEP allowed type checkers to assume an optional type when the default value is None, as in this code:
def handle_employee(e: Employee = None): ...
This would have been treated as equivalent to:
def handle_employee(e: Optional[Employee] = None) -> None: ...
This is no longer the recommended behavior. Type checkers should move towards requiring the optional type to be made explicit.
https://www.python.org/dev/peps/pep-0484/
We currently use implicit Optionals. mypy still allows them but may change this in the future.
Optionals
The text was updated successfully, but these errors were encountered:
Use explicit typing.Optional
7001ae8
close #171
Use explicit typing.Optional (#177)
d4617b2
Successfully merging a pull request may close this issue.
https://www.python.org/dev/peps/pep-0484/
We currently use implicit
Optionals
. mypy still allows them but may change this in the future.The text was updated successfully, but these errors were encountered: