"Tal Einat" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | Hi all, | | I just ran into this. In IDLE (Python 2.5), the call-tip for | itertools.count is: | "x.__init__(...) initializes x; see x.__class__.__doc__ for signature" | | That's itertools.count.__init__.__doc__, while itertools.count.__doc__ | is the informative doc-string ("DS" henceforth): | """count([firstval]) --> count object | | Return a count object whose .next() method returns consecutive | integers starting from zero or, if specified, from firstval.""" | | | That seems very counter-intuitive to me - I would expect the DS for | __init__ to explain how to use the constructor. | | IDLE's call-tip module obviously thinks so as it prefers the __init__ | DS to the class's DS. IPython does the opposite as far as I can tell, | when I enter 'itertools.count?' it shows the class's DS, but shows | nothing for a custom class whose __init__ has a DS while the class | itself does not. | | I'm wondering what a call-tip mechanism should do when a class and its | __init__ both have a DS. I'd be willing to work up a patch for IDLE's | call-tip module to work better in this regard, or for itertools and | similar classes in the stdlib, if needed.
Perhap IDLE should be changed, but I am not sure. After more discussion here, if any, this would be worth a tracker item. -- http://mail.python.org/mailman/listinfo/python-list