Is this a tiny bug?

Tim Peters tim.one at home.com
Mon Oct 8 00:45:24 EDT 2001


[Julius Welby]
> In Idle, when I use the tuple(sequence) built in function, the "tip" that
> pops up when I open the bracket is:
>
> tuple(sequence) -> list
>
> which surprised me, as I expected:
>
>  tuple(sequence) -> tuple.
>
> The function obviously works fine, but I wondered what controls the
> "tip", and if this is a mistake.

The tip is automatically extracted from the first line of the function's
docstring (tuple.__doc__).  The docstring was in error, and I happened to
fix it a few weeks ago (so you won't see this in 2.2a4).  It looks like the
docstring for tuple() was a cut-and-paste job from the docstring for list(),
and whoever did that forgot to s/list/tuple/g.

they'll-be-punished-but-probably-not-killed<wink>-ly y'rs  - tim





More information about the Python-list mailing list