[ python-Bugs-1560032 ] confusing error msg from random.randint
SourceForge.net
noreply at sourceforge.net
Sun Sep 17 08:22:07 CEST 2006
Bugs item #1560032, was opened at 2006-09-17 06:22
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1560032&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.4
Status: Open
Resolution: None
Priority: 5
Submitted By: paul rubin (phr)
Assigned to: Nobody/Anonymous (nobody)
Summary: confusing error msg from random.randint
Initial Comment:
See the following output. The reason for the confusing
message is that random.randint is actually a bound
method to a Random instance inside the module, i.e.
someone got a little bit too clever. It should be an
ordinary function that calls that instance method instead.
>>> import random
>>> random.randint(10000)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: randint() takes exactly 3 arguments (2 given)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1560032&group_id=5470
More information about the Python-bugs-list
mailing list