Skip to content

inspect.isgenerator is broken #997

@smurfix

Description

@smurfix

This doesn't quite match what I'd expect.

MicroPython v1.24.0-400.g160c2931f.dirty on 2025-04-10; linux [GCC 14.2.0] version
Use Ctrl-D to exit, Ctrl-E for paste mode
>>> async def fn():
...     pass
...
>>> x=fn()
>>> inspect.isgeneratorfunction(x)
False  ## correct
>>> inspect.isgenerator(x)
False  ## wrong
>>> x
<generator object 'fn' at 7f5b2a9534a0>
>>> inspect.isgeneratorfunction(fn)
True  ## correct
>>> inspect.isgenerator(fn)
True  ## wrong
>>> 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy