You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
from typing import Any
|
|
|
|
|
|
def is_scalar(var: Any) -> bool:
|
|
"""
|
|
Alias for 'not hasattr(var, "__len__")'
|
|
|
|
:param var: Checks if var has a length.
|
|
"""
|
|
return not hasattr(var, "__len__")
|