Add docstring to count_digits
Add docstring to iter_subclasses
Add docstring to classproperty
Add docstring to detect_encoding