This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Create json.JSONType
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.6
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: brett.cannon Nosy List: anish.shah, brett.cannon, gvanrossum, jstasiak
Priority: low Keywords: patch

Created on 2016-02-21 00:44 by brett.cannon, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
jsontype.diff brett.cannon, 2016-03-18 21:22 review
Messages (5)
msg260587 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-02-21 00:44
See https://github.com/python/typing/issues/182 for the full details, but it should be:

JSONType = t.Union[str, int, float, bool, None, t.Dict[str, t.Any], t.List[Any]]
msg261996 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-03-18 21:22
Here is a preliminary patch with docs. I didn't do any tests because I just don't know what kind of test we would want. Use isinstance() to make sure it covers the types we expect? And I'm not sure how to test the key type for mappings.
msg262191 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2016-03-22 15:44
I'm fine with the patch here. Go for it!
msg262192 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-03-22 15:51
I'll add some tests and a note that this was added in Python 3.6 and is provisional along with the typing module.
msg262208 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2016-03-22 19:32
Based on conversations in https://github.com/python/typing/issues/182 I'm closing this as rejected.
History
Date User Action Args
2022-04-11 14:58:27adminsetgithub: 70584
2016-03-22 19:32:34brett.cannonsetstatus: open -> closed
resolution: rejected
messages: + msg262208
2016-03-22 15:51:48brett.cannonsetmessages: + msg262192
2016-03-22 15:44:00gvanrossumsetmessages: + msg262191
2016-03-18 21:22:22brett.cannonsetfiles: + jsontype.diff
keywords: + patch
messages: + msg261996

stage: needs patch -> patch review
2016-03-10 00:03:51jstasiaksetnosy: + jstasiak
2016-02-22 16:45:36anish.shahsetnosy: + anish.shah
2016-02-21 00:44:28brett.cannoncreate