[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-20 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-20 Thread miss-islington
miss-islington added the comment: New changeset d05514ace652769457e6228f0186d4f830b676b9 by Miss Skeleton (bot) in branch '3.9': [3.9] bpo-42010: [docs] Clarify subscription of types (GH-22822) (GH-22840) https://github.com/python/cpython/commit/d05514ace652769457e6228f0186d4f830b676b9

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-20 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +21794 pull_request: https://github.com/python/cpython/pull/22840 ___ Python tracker

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-20 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 7cdf30fff39ea97f403b5472096349998d190e30 by kj in branch 'master': bpo-42010: [docs] Clarify subscription of types (GH-22822) https://github.com/python/cpython/commit/7cdf30fff39ea97f403b5472096349998d190e30 --

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-20 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think kj's patch is ready to merge. Guido, do you want to take a look? -- ___ Python tracker ___

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-20 Thread Ken Jin
Change by Ken Jin : -- pull_requests: +21779 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/22822 ___ Python tracker ___

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-16 Thread Guido van Rossum
Guido van Rossum added the comment: That sentence has been a lie for a long time (from the start?). Any type can define __getitem__ and get this behavior, though in this case it is done through __class_getitem__ (PEP NNN). -- ___ Python tracker

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Subscription of list and dict (only with '') and ??? is at least puzzling. Removal of a new feature after release is a bad idea. But this new feature, expansion of subscription, needs to documented in

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-12 Thread Ken Jin
Ken Jin added the comment: Partly due to Python 3.9.0's nascency, I've not been able to find online cases of beginners getting confused by this specific behavior. Wow I didn't know about integer variadics, assuming they make their way into 3.11, I can see why it'd be better to leave that in

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-12 Thread Guido van Rossum
Guido van Rossum added the comment: Have you observed actual users getting confused by this? (E.g. StackOverflow or mailing list posts.) I would assume that if you try to *do* anything with the resulting object it's going to cause a traceback, and from there it's pretty straightforward to

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-12 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-12 Thread Ken Jin
Ken Jin added the comment: I'd like to clarify the following too, currently: (1) >>> list[1] list[1] (2) >>> list[1, 2, 3] list[1, 2, 3] The PR only solves (1) and not (2), is (2) intended behavior? -- ___ Python tracker

[issue42010] Generic types accept indexing/subscripting, causing confusion

2020-10-12 Thread Ken Jin
Change by Ken Jin : -- title: Generic types accepts indexing/subscripting, causing confusion -> Generic types accept indexing/subscripting, causing confusion ___ Python tracker