> A built-in function 'isimmutable()' shall tell efficiently whether the
> object
> of concern is mutable or not.

What's the benefit over attempting to hash() the object?

copy.deepcopy already has special case for int, string, and tuples
(including tuples that do and do not have mutable members) - could what
you need be accomplished by overriding __copy__ and __deepcopy__ in your
custom class to return itself if it is immutable?
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to