mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-04 11:02:29 +00:00
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:
@@ -899,7 +899,7 @@ def is_list_like(obj):
|
|||||||
enough. Things like ``open()`` are also iterable (and probably many
|
enough. Things like ``open()`` are also iterable (and probably many
|
||||||
other things), so just support the commonly known list-like objects.
|
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):
|
def parse_phone(phone):
|
||||||
|
Reference in New Issue
Block a user