Skip to content

Inconsistent return types of overload variants of groupby_transform #974

@lord-haffi

Description

@lord-haffi

Hi guys,

I was wondering: When looking at the overload variants of groupby_transform in the more.pyi module, the return type annotation is sometimes Iterator, sometimes Iterable. Whereas, judging by the implementation it should always be an Iterator.

The return type annotation is Iterable whenever at least one of the arguments value_func or reduce_func is not None. I.e. the actual return type will then be a generator expression instead of the raw result of groupby (by the implementation). But generator expressions are also Iterators not only Iterables.

So this is more of a question, is there any reason to annotate it as Iterable instead?

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