[issue39601] brace escapes are not working in formatted string literal format specifications

2020-02-12 Thread JitterMan
JitterMan added the comment: Ah, that make sense. Thanks! -- ___ Python tracker <https://bugs.python.org/issue39601> ___ ___ Python-bugs-list mailing list Unsub

[issue39601] brace escapes are not working in formatted string literal format specifications

2020-02-11 Thread JitterMan
JitterMan added the comment: Okay, I get it. Someone might be using two braces in the format specifier because they found that it is a way to both evaluate a sub-expression and get braces in the formatted result. I was thinking that they would just use three braces, but that does not appear

[issue39601] brace escapes are not working in formatted string literal format specifications

2020-02-11 Thread JitterMan
JitterMan added the comment: I believe it is worth fixing as it clears up some rather glaring inconsistenciesā£ and enables a useful capability. Specifically, 1. Formatted string literals and the string format method are currently inconsistent in the way that they handle double braces

[issue39601] brace escapes are not working in formatted string literal format specifications

2020-02-10 Thread JitterMan
JitterMan added the comment: My expectation is that doubling up the braces acts to escape them, meaning that characters between the braces is treated as simple text and passed to the __format__ method as is. The only processing that should occur on the format specification is to convert

[issue39601] brace escapes are not working in formatted string literal format specifications

2020-02-10 Thread JitterMan
JitterMan added the comment: It appears as if escaping the braces by doubling them up is not working properly if the braces are in a format specification within a f-string. >>> print(f'Email:\n{C:{{v.name}} {{v.email}}|\n}') >>> Traceback

[issue39601] brace escapes are not working in formatted string literal format specifications

2020-02-10 Thread JitterMan
New submission from JitterMan : It appears as if escaping the braces by doubling them up is not working properly if the braces are in a format specification within a f-string. >>> print(f'Email:\n{C:{{v.name}} {{v.email}}|\n}') >>> Traceback

[issue26115] pathlib.glob('**') returns only directories

2016-02-03 Thread JitterMan
JitterMan added the comment: It may be what the documentation says it will do, but is not what it should do. I believe that because: 1. Currently ** in pathlib matches only directories, but **.py matches files. That seems inconsistent. 2. In bash, and csh, ** matches files and directories

[issue26096] '*' glob string matches dot files in pathlib

2016-02-03 Thread JitterMan
JitterMan added the comment: Globbing has been with us for almost 50 years, and in all that time it has never matched the hidden files/directories. There may be isolated cases where matching the hidden items is preferred, but generally that is not the case. Indeed, the primary characteristic

[issue26113] pathlib p.match('') should return False rather than raising exception

2016-01-14 Thread JitterMan
JitterMan added the comment: I don't know that passing '' as a pattern to glob() makes much sense, but it is useful when passed to match(). Doing so allows me to build a filter that can easily and naturally be disabled. For example, the following allows me to get all the items in a directory

[issue26113] pathlib p.match('') should return False rather than raising exception

2016-01-14 Thread JitterMan
New submission from JitterMan: One can use '*' as an 'accept all' pattern to match(). It would be nice to also use '' as a 'reject all' pattern. These 'accept all' and 'reject all' rules are useful as defaults. Currently passing '' to match() causes an exception. While it is easy enough

[issue26096] '*' glob string matches dot files in pathlib

2016-01-12 Thread JitterMan
New submission from JitterMan: Path('.').glob('*') generates all files and directories in '.' including hidden files (those that begin with '.'). This behavior is inconsistent with the shell and with the old glob module, which only generate hidden files if the glob pattern starts

[issue24171] httplib

2015-05-12 Thread JitterMan
New submission from JitterMan: In python2.7.9, httplib.py, on line 780, makes a call to: line = response.fp.readline(_MAXLINE + 1) This ends up calling a function defined on line 1362 in the same file: def readline(self): Notice the argument mismatch. The call passes two arguments

[issue17849] Missing size argument in readline() method for httplib's class LineAndFileWrapper

2015-05-12 Thread JitterMan
JitterMan added the comment: I ran into this problem when I gave https_proxy an invalid value: export https_proxy=http://foo.com No divine intervention required. I was just trying to determine what message was printed with the proxy environment variable was set incorrectly. Perhaps