|View source on GitHub|
py_object might be a singleton value .
tfdocs.doc_generator_visitor.maybe_singleton( py_object: Any ) -> bool
Many immutable values in python act like singletons: small ints, some strings, Bools, None, the empty tuple.
We can't rely on looking these up by their
id() to find their name or
This function checks if the object is one of those maybe singleton values.
||the object to check.|
|A bool, True if the object might be a singleton.|