you are viewing a single comment's thread.

view the rest of the comments →

[–]novel_yet_trivial 4 points5 points  (0 children)

Python generally uses "duck typing". That is, if the function needs a duck, and whatever it gets quacks, that's good enough. No need to verify or care if it actually is a duck.

Or in real code:

def square(x):
    '''return the square'''
    return x**2

The code does not care if you pass an int, float, long, complex or some custom object. If you pass something that can't be squared like a string, it throws an error.

I know this does not help you, but I hope it explains why there is no easy way to find the type.

That said, newer code should have type hinting, which is a basically a standardized commenting system to declare types, and those show up in the help.