gh-123341: Support `tkinter.Event` type subcript (#123353) · python/cpython@42a8189 · GitHub
Skip to content

Commit 42a8189

Browse files
authored
gh-123341: Support tkinter.Event type subcript (#123353)
Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
1 parent 64af2b2 commit 42a8189

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

Lib/test/test_genericalias.py

Lines changed: 6 additions & 0 deletions

Lib/tkinter/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ def __repr__(self):
295295
''.join(' %s=%s' % (k, attrs[k]) for k in keys if k in attrs)
296296
)
297297

298+
__class_getitem__ = classmethod(types.GenericAlias)
299+
298300

299301
_support_default_root = True
300302
_default_root = None
Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)