mirror of
https://github.com/welton89/RRBEC.git
synced 2026-04-06 22:14:12 +00:00
first commit
This commit is contained in:
21
gestao_raul/Lib/site-packages/django/utils/itercompat.py
Normal file
21
gestao_raul/Lib/site-packages/django/utils/itercompat.py
Normal file
@@ -0,0 +1,21 @@
|
||||
# RemovedInDjango60Warning: Remove this entire module.
|
||||
|
||||
import warnings
|
||||
|
||||
from django.utils.deprecation import RemovedInDjango60Warning
|
||||
|
||||
|
||||
def is_iterable(x):
|
||||
"An implementation independent way of checking for iterables"
|
||||
warnings.warn(
|
||||
"django.utils.itercompat.is_iterable() is deprecated. "
|
||||
"Use isinstance(..., collections.abc.Iterable) instead.",
|
||||
RemovedInDjango60Warning,
|
||||
stacklevel=2,
|
||||
)
|
||||
try:
|
||||
iter(x)
|
||||
except TypeError:
|
||||
return False
|
||||
else:
|
||||
return True
|
||||
Reference in New Issue
Block a user