Issue 26396: Create json.JSONType - Python tracker (original) (raw)

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:27 admin set github: 70584
2016-03-22 19:32:34 brett.cannon set status: open -> closedresolution: rejectedmessages: +
2016-03-22 15:51:48 brett.cannon set messages: +
2016-03-22 15:44:00 gvanrossum set messages: +
2016-03-18 21:22:22 brett.cannon set files: + jsontype.diffkeywords: + patchmessages: + stage: needs patch -> patch review
2016-03-10 00:03:51 jstasiak set nosy: + jstasiak
2016-02-22 16:45:36 anish.shah set nosy: + anish.shah
2016-02-21 00:44:28 brett.cannon create