[issue13152] textwrap: support custom tabsize

2011-10-11 Thread John Feuerstein
New submission from John Feuerstein : 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: textwrap_tabsize.diff keywords

[issue12567] curses implementation of Unicode is wrong in Python 3

2011-11-07 Thread John Feuerstein
Changes by John Feuerstein : -- nosy: +john.feuerstein ___ Python tracker <http://bugs.python.org/issue12567> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13152] textwrap: support custom tabsize

2011-11-07 Thread John Feuerstein
John Feuerstein 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

[issue13365] str.expandtabs documentation is wrong

2011-11-07 Thread John Feuerstein
New submission from John Feuerstein : 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

[issue12941] add random.pop()

2011-09-08 Thread John Feuerstein
New submission from John Feuerstein : 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 (Lib) files

[issue12941] add random.pop()

2011-09-09 Thread John Feuerstein
John Feuerstein 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() metho

[issue12941] add random.pop()

2011-09-09 Thread John Feuerstein
John Feuerstein 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 > sequenc