def format_class(obj):
    """
	Format the name of the class of ``obj``.

	Example::

		>>> misc.format_class(42)
		'int'
		>>> misc.format_class(open('README.rst', 'rb'))
		'_io.BufferedReader'
	"""
    if obj.__class__.__module__ not in ('builtins', 'exceptions'):
        return f'{obj.__class__.__module__}.{obj.__class__.__qualname__}'
    else:
        return obj.__class__.__qualname__
