Consider range list-like

This allows you to pass range() to things such as get_messages as ids= without first explicitly converting it to a list.
This commit is contained in:
Nick80835 2025-02-08 19:23:12 -05:00 committed by Lonami
parent 9762a83541
commit 1cb5ff1dd5

View File

@ -899,7 +899,7 @@ def is_list_like(obj):
enough. Things like ``open()`` are also iterable (and probably many
other things), so just support the commonly known list-like objects.
"""
return isinstance(obj, (list, tuple, set, dict, GeneratorType))
return isinstance(obj, (list, tuple, set, dict, range, GeneratorType))
def parse_phone(phone):