Skip to content

Lowest common denominator of set and fronzenset? #9591

Answered by Azureblade3808
dimaqq asked this question in Q&A
Discussion options

You must be logged in to vote

collections.abc.Set (also known as typing.AbstractSet) may suit your need.

from collections.abc import Set

def func(x: Set[int]): ...

func({0})
func(frozenset({0}))

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@dimaqq
Comment options

@erictraut
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by dimaqq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants