Content-Length: 298595 | pFad | https://github.com/python/cpython/issues/123341

B1 `tkinter.Event` is not subscriptable at runtime but generic in stub file · Issue #123341 · python/cpython · GitHub
Skip to content

tkinter.Event is not subscriptable at runtime but generic in stub file #123341

@yowoda

Description

@yowoda

Bug report

Bug description:

import tkinter
tkinter.Event[tkinter.Canvas] # TypeError: 'type' object is not subscriptable

This has been briefly discussed at python/typeshed#12591

It would be great if this problem (a little more detailed version here) could be fixed in the entire standard library. As of right now, the inconsistency of class subscription support is just way too confusing for developers.

CPython versions tested on:

3.8, 3.9, 3.10, 3.11, 3.12, 3.13, CPython main branch

Operating systems tested on:

Linux, Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/123341

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy