Does hashlib support a file mode?
bahamutzero8825 at gmail.com
Fri Jul 8 04:32:59 CEST 2011
On 2011.07.07 08:46 PM, Steven D'Aprano wrote:
> None is not a type, it is an instance.
> >>> isinstance(None, type) # is None a type?
> >>> isinstance(None, type(None)) # is None an instance of None's type?
> So None is not itself a type, although it *has* a type:
> >>> type(None)
> <type 'NoneType'>
> >>> isinstance(type(None), type) # is NoneType itself a type?
I worded that poorly. None is (AFAIK) the only instance of NoneType, but
I should've clarified the difference.
> The is operator does not compare types, it compares instances for identity.
> There is no need for is to ever care about the type of the arguments --
> that's just a waste of time, since a fast identity (memory location) test
> is sufficient.
"Compare" was the wrong word. I figured the interpreter doesn't
explicitly compare types, but obviously identical instances are going to
be of the same type.
More information about the Python-list