Re:Python’s “type hints” are a bit of a disappointment to me
by bayesian_horse on Friday April 22, 2022 @12:21AM
(#31118184)
The "print" function will take any Python object and call its "__str__" method. Not sure if it will do it to a string, but the outcome would be the same.
As far as I remember, the "__str__" method is present on all objects in some form, so print will happily take any type.
As far as I remember, the "__str__" method is present on all objects in some form, so print will happily take any type.