[New-bugs-announce] [issue27644] Expand documentation about type aliases and NewType in the typing module

Michael Lee report at bugs.python.org
Thu Jul 28 13:29:04 EDT 2016


New submission from Michael Lee:

This is a patch to update the documentation on the typing module. It expands the section on type aliases and adds a section on [NewType][0].

Since support for NewType was [recently added][1] to mypy, it seemed like a prudent time to update the docs to describe this new feature.

The section on type aliases was mainly expanded because the distinction between type aliases and NewType could be potentially confusing, so adding extra clarification seemed like a good idea.

  [0]: https://www.python.org/dev/peps/pep-0484/#newtype-helper-function
  [1]: https://github.com/python/mypy/pull/1939

----------
assignee: docs at python
components: Documentation
files: document_newtype.patch
keywords: patch
messages: 271572
nosy: docs at python, michael0x2a
priority: normal
severity: normal
status: open
title: Expand documentation about type aliases and NewType in the typing module
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file43926/document_newtype.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27644>
_______________________________________


More information about the New-bugs-announce mailing list