[issue33129] Add kwarg-only option to dataclass

2020-03-28 Thread Michael Lee
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

[issue33129] Add kwarg-only option to dataclass

2020-03-28 Thread Michael Lee
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

[issue28073] Update documentation about None vs type(None) in typing

2016-09-10 Thread Michael Lee
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

[issue28049] Add documentation for typing.Awaitable and friends

2016-09-09 Thread Michael Lee
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

[issue27905] Add documentation for typing.Type

2016-09-06 Thread Michael Lee
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

[issue27905] Add documentation for typing.Type

2016-08-30 Thread Michael Lee
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

[issue27723] Document typing.Text and typing.AnyStr

2016-08-15 Thread Michael Lee
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

[issue27723] Document typing.Text and typing.AnyStr

2016-08-09 Thread Michael Lee
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

[issue27689] Add documentation for typing.Generator

2016-08-05 Thread Michael Lee
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

[issue27689] Add documentation for typing.Generator

2016-08-05 Thread Michael Lee
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.

[issue27688] Expand documentation about Any in the typing module

2016-08-05 Thread Michael Lee
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

[issue27689] Add documentation for typing.Generator

2016-08-04 Thread Michael Lee
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

[issue27688] Expand documentation about Any in the typing module

2016-08-04 Thread Michael Lee
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

[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-29 Thread Michael Lee
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.

[issue27644] Expand documentation about type aliases and NewType in the typing module

2016-07-28 Thread Michael Lee
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

[issue27402] Sequence example in typing module documentation does not typecheck

2016-06-27 Thread Michael Lee
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

[issue27402] Sequence example in typing module documentation does not typecheck

2016-06-27 Thread Michael Lee
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