[issue26897] Clarify Popen stdin, stdout, stderr

2016-04-30 Thread Yclept Nemo
New submission from Yclept Nemo: From: https://docs.python.org/dev/library/subprocess.html#popen-constructor "..., an existing file descriptor (a positive integer), an existing file object, and None." It should be made clear that the file object must be backed by an operating s

[issue25614] Lib/code.py: InteractiveConsole.raw_input writes prompt to stdout

2015-11-12 Thread Yclept Nemo
New submission from Yclept Nemo: Just like InteractiveInterpreter.write and the actual python interpreter, the console's prompt should be written to stderr. Something like: self.write(prompt) return input() -- components: Library (Lib) messages: 254575 nosy: Yclept.Nemo pri

[issue16399] argparse: append action with default list adds to list instead of overriding

2014-08-06 Thread Yclept Nemo
Yclept Nemo added the comment: Well that won't work. Example: import argparse class TestAction(argparse.Action): def __call__(self, parser, namespace, values, option_string=None): print("default: {}({})\tdest: {}({})".format(self.default, type(self.default), ge

[issue15224] Range: Additional Methods (min/max/__and__)

2012-06-30 Thread Yclept Nemo
Yclept Nemo added the comment: >> None of those are specific to arithmetic progressions (i.e., range-like >> lists / sets), as far as I can tell. Does this (the data-type involved) really matter? >> I could see more use for general list-intersection functionality. Th

[issue15224] Range: Additional Methods (min/max/__and__)

2012-06-29 Thread Yclept Nemo
Yclept Nemo added the comment: On a side note, glancing at Python-3.3.0a4/Objects/rangeobject.c: range_contains seems to iterate through the entire range whereas __contains__ from the attached Range.py is O(1) -- ___ Python tracker <h

[issue15224] Range: Additional Methods (min/max/__and__)

2012-06-29 Thread Yclept Nemo
Yclept Nemo added the comment: >>> a=Range.Range(5,61,4) >>> ar=Range.Range(57,1,-4) >>> b=Range.Range(21,63,6) >>> br=Range.Range(57,15,-6) >>> list(a); list(ar); list(b); list(br) [5, 9, 13, 17, 21, 25, 29, 33, 37, 41, 45, 49, 53, 57] [57, 53, 49,

[issue15224] Range: Additional Methods (min/max/__and__)

2012-06-29 Thread Yclept Nemo
Yclept Nemo added the comment: > max and min for a range object are already O(1) one-liners: true; dropping > As for __and__, it doesn't feel like a particularly natural operation to me, > given that a range object represents an *ordered* sequence of integers rather > t

[issue15224] Range: Additional Methods (min/max/__and__)

2012-06-29 Thread Yclept Nemo
New submission from Yclept Nemo : Python 3.3 expands the range class but I would find some additional methods useful: min/max: provides O(1) time __and__: provides intersection: Range(...) & Range(...) examples: intersection #1: a=Range.Range(9,58,4) b=Range.Range(15,69,6) c=a&b