[Python-ideas] PEP 485: A Function for testing approximate equality
Mark Lawrence
breamoreboy at yahoo.co.uk
Tue Jan 27 17:19:01 CET 2015
On 27/01/2015 16:07, Paul Moore wrote:
> On 27 January 2015 at 15:56, Ron Adam <ron3200 at gmail.com> wrote:
>> Would it help if it was consistent order wise with other python functions
>> such as is_instance?
>
> /me tries to remember the order of arguments for isinstance and fails :-)
> Paul
>
Can you remember how to do this?
>>> help(isinstance)
Help on built-in function isinstance in module builtins:
isinstance(obj, class_or_tuple, /)
Return whether an object is an instance of a class or of a subclass
thereof.
A tuple, as in ``isinstance(x, (A, B, ...))``, may be given as the
target to check against. This is equivalent to ``isinstance(x, A) or
isinstance(x, B) or ...`` etc.
Or do you need help :)
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.
Mark Lawrence
More information about the Python-ideas
mailing list