Comment 2 for bug 804576

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for reporting this issue and helping to make Ubuntu better.

I see the same result with your example with pychecker 0.8.19-6 on Ubuntu Raring. As I haven't used complex() before, I decided to check the documentation to see how many arguments it really require. However, I found conflicting information. According to python.org [1], the signature is complex([real[, imag]]). However, pydoc complex will list the following signature:
class complex(object)
 | complex(real[, imag]) -> complex number

In other words, one have only optional arguments, while the second require at least one argument and has an optional second one. I have not verified this, but I would believe pychecker checks the signature of the method in the same place pydoc gets it from. The question then is why do they differ, and which is the correct one?

[1] http://docs.python.org/2/library/functions.html#complex