-
Notifications
You must be signed in to change notification settings - Fork 18
[FEATURE] keys_of() method #13
Copy link
Copy link
Open
Labels
Effort: MediumHow to waste a beautiful weekendHow to waste a beautiful weekendNeeds: DocImprovements or additions to documentationImprovements or additions to documentationNeeds: TestHey, it compiles! Ship it!Hey, it compiles! Ship it!Priority: LowNot a big problem...Not a big problem...Type: EnhancementNew feature or requestNew feature or request
Metadata
Metadata
Assignees
Labels
Effort: MediumHow to waste a beautiful weekendHow to waste a beautiful weekendNeeds: DocImprovements or additions to documentationImprovements or additions to documentationNeeds: TestHey, it compiles! Ship it!Hey, it compiles! Ship it!Priority: LowNot a big problem...Not a big problem...Type: EnhancementNew feature or requestNew feature or request
keys_of(value, deep=False)method should return a generator, that checks infrozendictvalues if they are equal tovalue. If yes, the keys are yielded.If
deep=True,valuedoes not match the current value and it's a iterable, that is not an iterator-like or a set-like, the function will search recursively for the value in the iterable and any sub-iterable. If the iterable is a sequence, the indexes of the value is yielded. If it's a map-like, the keys are yielded.Example:
See also #14