[issue38217] argparse should support multiple types when nargs > 1

2019-09-18 Thread Ryan Govostes
New submission from Ryan Govostes : argparse supports consuming multiple command-line arguments with nargs=2, etc. It converts them to the type given in the argument's type parameter. argparse does not provide a good solution when the input arguments should be different data types. F

[issue38595] io.BufferedRWPair doc warning may need clarification

2019-10-25 Thread Ryan Govostes
New submission from Ryan Govostes : The documentation for the io.BufferedRWPair class gives this warning: > BufferedRWPair does not attempt to synchronize accesses to its underlying raw > streams. You should not pass it the same object as reader and writer; use > BufferedRandom in

[issue38595] io.BufferedRWPair doc warning may need clarification

2019-10-25 Thread Ryan Govostes
Ryan Govostes added the comment: The origin of this warning involves interleaving read and write operations, and was added here: https://bugs.python.org/issue12213 I'm not sure if it applies to sockets, pipes, etc. though. The pySerial documentation advises using io.BufferedRWPair

[issue20126] sched doesn't handle events added after scheduler starts

2020-01-19 Thread Ryan Govostes
Ryan Govostes added the comment: This absolutely should be documented. If adding an earlier event is not supported then it should raise an exception. Appearing the enqueue the event but not triggering the callback is especially confusing. It may be obvious behavior to someone who has spent

[issue42542] weakref documentation does not fully describe proxies

2020-12-02 Thread Ryan Govostes
New submission from Ryan Govostes : The documentation for weakref.proxy() does not describe how the proxy object behaves when the object it references is gone. The apparent behavior is that it raises a ReferenceError when an attribute of the proxy object is accessed. It would probably be a

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-27 Thread Ryan Govostes
Ryan Govostes added the comment: Thanks Michael for all of the examples. After reading them all, I concur that "it can be hard to conceptualize what the exact behavior should be." A documentation change is warranted, at the least. However the argparse documentation, while great

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2018-12-14 Thread Ryan Govostes
New submission from Ryan Govostes : import argparse parser = argparse.ArgumentParser() parser.add_argument('things', nargs=argparse.REMAINDER, default=['nothing']) parser.parse_args([]) >>> Namespace(things=[]) Since there were no unparsed arguments remaini

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2018-12-14 Thread Ryan Govostes
Change by Ryan Govostes : -- versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue35

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-07 Thread Ryan Govostes
Ryan Govostes added the comment: Just don’t run the last line which is just an echoing of the output of parser.parse_args() repeated. The Namespace type would need to be imported if you really wanted to but there’s no point. On Tuesday, May 7, 2019, Michael Blahay wrote: > > Michael

[issue32347] System Integrity Protection breaks shutil.copystat()

2017-12-16 Thread Ryan Govostes
New submission from Ryan Govostes : On macOS, shutil.copystat() uses chflags() to try to copy filesystem flags from the source to destination. In recent years, Apple introduced System Integrity Protection, which prevents modification of system files. These files have the non-standard

[issue32347] System Integrity Protection breaks shutil.copystat()

2017-12-17 Thread Ryan Govostes
Change by Ryan Govostes : -- keywords: +patch pull_requests: +4806 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue32347> ___ ___ Py

[issue20821] Should be able to break long numbers across lines

2014-03-01 Thread Ryan Govostes
New submission from Ryan Govostes: I cannot find a way to break a long number across multiple lines, other than to write the number as a string, take advantage of string literal concatenation, and then convert the string to an integer. I'd like to be able to write, for exampl