Changes by John Feuerstein j...@feurix.com:
--
nosy: +john.feuerstein
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue12567
___
___
Python-bugs-list
John Feuerstein j...@feurix.com added the comment:
textwrap_tabsize_v2.diff:
* Moved the tabsize parameter to the end of the parameter list
* Added documentation update
* Made the test case more obvious
--
Added file: http://bugs.python.org/file23624/textwrap_tabsize_v2.diff
New submission from John Feuerstein j...@feurix.com:
The documentation for str.expandtabs([tabsize]) is wrong:
Return a copy of the string where all tab characters are replaced by one or
more spaces, depending on the current column and the given tab size. [...]
This should read zero or more
New submission from John Feuerstein j...@feurix.com:
The textwrap module calls .expandtabs() to expand tabs to spaces.
This patch adds support for a custom tabsize, so that .expandtabs(tabsize) is
called instead.
Includes test case.
--
components: Library (Lib)
files
John Feuerstein j...@feurix.com added the comment:
r.pop(random.randrange(0, len(r)))
So seq[random.randrange(0, len(seq))] suddenly makes random.choice(seq)
obsolete? There is no functional reasoning here, it's convenience for a common
operation.
Not all the sequences have a .pop() method
John Feuerstein j...@feurix.com added the comment:
The test doesn't have to check that seq.pop() is working fine (there are
other tests for that) but that it's actually called and that it pops the
right element from the input sequence (and not e.g. from a copy of the
sequence that might
New submission from John Feuerstein j...@feurix.com:
This patch against current hg tip (72314:92842e347d98) adds random.pop():
pop(self, seq) method of Random instance
Remove and return a random element from a non-empty sequence.
Includes test case.
--
components: Library