Skip to content

v2.11

Compare
Choose a tag to compare
@Fatal1ty Fatal1ty released this 04 Jan 20:08
· 750 commits to master since this release

Changes

  • PEP 604 compliance.
  • Fixed that Union[None, X] with None on the first place wasn't treated as Optional[X].
  • Fixed that Union[X, T] where T was resolved to None wasn't treated as Optional[X].
  • Allow using None as the field type (it's considered equivalent to NoneType).
  • Changed the name of NoneType to None in Unions for convenience. In the previous versions you could see Union[int, str, NoneType] instead of Union[int, str, None] if the field was declared as Union[int, str, None].