Strange error message when calling random in Py1.5

Tim Peters tim_one at email.msn.com
Mon May 8 01:58:44 EDT 2000


[William Tanksley]
> I'm running Python 1.5, doing some scripting for an urgent project (aren't
> they all), when I get an odd error.  I can't imagine that this is normal;
> I can reproduce it from the Python prompt:
>
> Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
> Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
> >>> import random
> >>> random.random(100)
> Traceback (innermost last):
>    File "<pyshell#1>", line 1, in ?
>       random.random(100)
> TypeError: too many arguments; expected 1, got 2
> >>>
>
> Whew.  This one's not believable.  Any ideas?

random.random() doesn't take any arguments, of course.  If you use a current
IDLE or PythonWin, the signature will pop up in a "calltip" window as soon
as you type the left paren that opens the call.

urgency-creates-more-of-itself-ly y'rs  - tim






More information about the Python-list mailing list