Michael Lee added the comment:
Hello! I've submitted a PR based on this issue, since it seemed the most
relevant from my searching of the backlog.
Here's a link: https://github.com/python/cpython/pull/19206
--
___
Python tracker
<ht
Change by Michael Lee :
--
nosy: +michael.lee
nosy_count: 5.0 -> 6.0
pull_requests: +18569
pull_request: https://github.com/python/cpython/pull/19206
___
Python tracker
<https://bugs.python.org/issu
New submission from Michael Lee:
For some reason, the section of the typing docs about Optional stated that
Optional[T] was equivalent to Union[T, type(None)]. While this is true, it's
somewhat inconsistent and potentially confusing since everywhere else in the
docs, we just use None
New submission from Michael Lee:
This patch adds documentation for Awaitable, AsyncIterable, and AsyncIterator
to the typing module, mostly linking to the corresponding class in
collections.abc.
It also briefly clarifies the documentation on generators to explain that you
may use either
Michael Lee added the comment:
Ok, here's version 2, taking into account Ivan's feedback!
--
Added file: http://bugs.python.org/file44401/document-type-v2.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
New submission from Michael Lee:
This patch adds some documentation for typing.Type[C]. The content itself is
mostly an abbreviated version of the description from PEP 484 -- let me know if
the patch is too terse or needs more examples.
--
assignee: docs@python
components
Michael Lee added the comment:
Second revision attached below.
--
Added file: http://bugs.python.org/file44121/document-text-and-anystr-2.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
New submission from Michael Lee:
This patch documents typing.Text and typing.AnyStr.
I decided against creating a new top-level section to document Text/AnyStr
mainly because it seems like how exactly str/bytes/unicode is handled by mypy
and described in PEP 484 might be changing sometime
Michael Lee added the comment:
Revision 3 -- I changed the protocol for the example so that you stop the
generator by sending in a negative number as a sentinel rather then None.
--
Added file: http://bugs.python.org/file44027/document-generators-v3.patch
Michael Lee added the comment:
Revision two -- I added a brief note mentioning that SendType is contravariant,
as Ivan suggested.
--
Added file: http://bugs.python.org/file44026/document-generators-v2.patch
___
Python tracker <rep...@bugs.python.
Michael Lee added the comment:
Here's revision two. The only change I didn't make was the one about the
isinstance check. It isn't included in PEP 484, and after talking to Guido, he
decided it wouldn't be appropriate to document it here.
--
Added file: http://bugs.python.org
New submission from Michael Lee:
This patch adds (previously missing) documentation for `typing.Generator`.
--
assignee: docs@python
components: Documentation
files: document-generators.patch
keywords: patch
messages: 272010
nosy: docs@python, gvanrossum, michael0x2a
priority: normal
New submission from Michael Lee:
This patch updates the section about `Any` in the typing module. Previously,
that section was relatively sparse and didn't seem to do a very good job of
helping the reader understand what the distinction between `Any` and `object`
is.
This patch expands
Michael Lee added the comment:
Ok, here's revision 2 of my patch, after applying the changes from the last
round of feedback.
--
Added file: http://bugs.python.org/file43939/document_newtype_rev2.patch
___
Python tracker <rep...@bugs.python.
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
Michael Lee added the comment:
Whoops, forgot the link to the error in the docs:
https://docs.python.org/3/library/typing.html#typing.List
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
New submission from Michael Lee:
In the documentation for the `typing` module, the [entry for the `List`
type][0] uses the following example to help demonstrate when to use `Sequence`
vs `List`:
T = TypeVar('T', int, float)
def vec2(x: T, y: T) -> List[T]:
return [x
17 matches
Mail list logo