mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-02-21 14:05:17 +03: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:
parent
9762a83541
commit
1cb5ff1dd5
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue
Block a user