[Python-bugs-list] [ python-Bugs-753602 ] random.sample not properly documented

SourceForge.net noreply@sourceforge.net
Thu, 12 Jun 2003 15:18:28 -0700


Bugs item #753602, was opened at 2003-06-12 22:18
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=753602&group_id=5470

Category: Documentation
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Gerrit Holl (gerrit)
Assigned to: Nobody/Anonymous (nobody)
Summary: random.sample not properly documented

Initial Comment:
random.sample seems to take a third argument:

 38 >>> random.sample(seq, 10, 'bla')
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.3/random.py", line 247,
in sample
    j = int(random() * (n-i))
TypeError: 'str' object is not callable

However, the docs don't mention it.
I will try to patch it tomorrow (need to find out what
it does first ;)

Gerrit.

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

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=753602&group_id=5470