Bugs item #1560032, was opened at 2006-09-17 06:22
Message generated for change (Comment added) made by gbrandl
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: 3
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)



----------------------------------------------------------------------

>Comment By: Georg Brandl (gbrandl)
Date: 2006-10-12 10:51

Message:
Logged In: YES 
user_id=849994

Note that it is documented that the random functions are
actually bound methods.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1560032&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to