Skip to content

Commit

Permalink
added support for 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
satcfdi committed Mar 19, 2024
1 parent 4d1f126 commit dee8304
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions satcfdi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,16 @@ class ScalarMap(dict):
def iterate(item):
if isinstance(item, str | bytes | ScalarMap):
yield item
elif isinstance(item, Mapping):
return
if isinstance(item, Mapping):
yield from item.values()
elif isinstance(item, Sequence):
return
if isinstance(item, Sequence):
yield from item
elif item is None:
return
else:
yield item
if item is None:
return
yield item


class StrEnum(str, enum.Enum): # Compatible with Python 3.10
Expand Down

0 comments on commit dee8304

Please sign in to comment.