[issue46617] CSV Creation occasional off by one error

2022-02-02 Thread Eric V. Smith
Eric V. Smith added the comment: There's too much for us to look at here. Can you create a small example which demonstrates the problem? It should include the input, the code, the actual output, and the expected output. -- nosy: +eric.

[issue46617] CSV Creation occasional off by one error

2022-02-02 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug ___ Python tracker <https://bugs.python.org/issue46617> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46628] Can't install YARL

2022-02-03 Thread Eric V. Smith
Eric V. Smith added the comment: It looks like you're missing dependencies required to compile yarl. Since this isn't a bug with Python, I'm going to close this. I suggest you ask the yarl community for help. Their home page is https://github.com/aio-libs/yarl/ Good luck!

[issue46628] Can't install YARL

2022-02-03 Thread Eric V. Smith
Eric V. Smith added the comment: Ah. longintrepr.h is an internal Python file, not meant for external consumption. This file moved in Python 3.11. So this is still a yarl issue: they'll need to adjust how they read that file. But my recommendation is that they find another way to do

[issue46636] Bugs of 2to3 on built-in function or types(classes)

2022-02-04 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure what you're trying to accomplish here, but long and unichr are not available in python 3. 2to3 has been deprecated and is no longer supported. -- nosy: +eric.smith ___ Python track

[issue46637] Incorrect error message: "missing 1 required positional argument"

2022-02-04 Thread Eric V. Smith
Eric V. Smith added the comment: I guess the technically correct term is positional-or-keyword, but that seems like too much: https://docs.python.org/3/glossary.html I think dropping "positional" doesn't increase the precision of the error message, but I'll admit I can

[issue46637] Incorrect error message: "missing 1 required positional argument"

2022-02-04 Thread Eric V. Smith
Eric V. Smith added the comment: Given this current behavior: >>> def foo(a, /, b): pass ... >>> foo() Traceback (most recent call last): File "", line 1, in TypeError: foo() missing 2 required positional arguments: 'a' and 'b' What would y

[issue46683] Python 3.6.15 source tarball installs 3.6.8?

2022-02-08 Thread Eric V. Smith
Eric V. Smith added the comment: Where did you get the tarball? -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue46683> ___ ___ Python-bug

[issue46683] Python 3.6.15 source tarball installs 3.6.8?

2022-02-08 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> not a bug status: open -> closed ___ Python tracker <https://bugs.python.org/issue46683> ___ ___ Python-bugs-

[issue46692] match case does not support regex

2022-02-09 Thread Eric V. Smith
New submission from Eric V. Smith : You need to provide more information. Is your concern that re.match objects aren't matched like dicts are, despite looking like a mapping? import re def f(map): print(f'input={m["one"]} {m["two"]}') match ma

[issue46692] match case does not support regex

2022-02-09 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Interpreter Core ___ Python tracker <https://bugs.python.org/issue46692> ___ ___ Python-bugs-list mailing list Unsub

[issue46692] match case does not support regex

2022-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: Oops, slight bug in my code. Use this: import re def f(map): print(f'input={map["one"]} {map["two"]}') match map: case {'one': x, 'two': y}: print(f"match {x} {y}")

[issue46692] match case does not support regex

2022-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: Looking at PEP 634, the obvious way to add support for this is to have the re.Match object specify Py_TPFLAGS_MAPPING. But I tried that, and then I get this error when using an re.Match object in a match statement: case {'one': x

[issue46692] match case does not support regex

2022-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: Good catch, @xtreak. I think something like the discussed (but not implemented) custom matching protocol would be required here. __match_args__ won't work, because it's a special attribute only checked on classes, not instances. Of course, I'm

[issue46693] dataclass generated __str__ does not use overridden member __str__

2022-02-09 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker <https://bugs.python.org/issue46693> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46693] dataclass generated __str__ does not use overridden member __str__

2022-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: I believe dataclasses uses repr() of the members, not str(). Can you try using specifying __repr__ in Teacup? Just __repr__ = __str__ should work. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.

[issue43532] Add keyword-only fields to dataclasses

2022-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Henry Schreiner! -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/i

[issue46693] dataclass generated __str__ does not use overridden member __str__

2022-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: I'll close it. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.pyth

[issue46701] cannot use typographical quotation marks in bug description

2022-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: Please report bug tracker bugs at https://github.com/python/bugs.python.org Although to be honest I doubt this will be fixed, since we're moving to Github issues. -- nosy: +eric.smith resolution: -> third party stage: -> resolved s

[issue46739] dataclasses __eq__ isn't logical

2022-02-13 Thread Eric V. Smith
Eric V. Smith added the comment: I agree with Mark. It's identical to: >>> () == () True As for the non-dataclass version, that's a normal object identity comparison if no __eq__ is defined: https://docs.python.org/3/reference/datamodel.html#object.__eq__

[issue46739] dataclasses __eq__ isn't logical

2022-02-13 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker <https://bugs.python.org/issue46739> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46735] gettext.translations crashes when locale is unset

2022-02-13 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Library (Lib) -Parser type: crash -> behavior ___ Python tracker <https://bugs.python.org/issue46735> ___ ___ Python-

[issue46751] Windows-style path is not recognized under cygwin

2022-02-14 Thread Eric V. Smith
Eric V. Smith added the comment: Are you running from bash (or another cygwin shell), or from cmd.exe, or something else? How did you install the version of python you're executing in the examples you provided? To my knowledge, cygwin's installer doesn't have a 3.9 availabl

[issue46751] Windows-style path is not recognized under cygwin

2022-02-14 Thread Eric V. Smith
Eric V. Smith added the comment: >:) Citing myself: >> Trying this *bash* command line: Oops, sorry for missing that. As for 3.9: it's not available through the 64 bit installer (at least, I don't see it there). I'll look and see what's involved in installin

[issue46762] assertion failure in f-string parsing Parser/string_parser.c

2022-02-15 Thread Eric V. Smith
Eric V. Smith added the comment: Good catch! I'll have a patch tonight. -- ___ Python tracker <https://bugs.python.org/issue46762> ___ ___ Python-bugs-l

[issue46762] assertion failure in f-string parsing Parser/string_parser.c

2022-02-15 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +29515 stage: -> patch review pull_request: https://github.com/python/cpython/pull/31365 ___ Python tracker <https://bugs.python.org/issu

[issue46762] assertion failure in f-string parsing Parser/string_parser.c

2022-02-16 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset ffd9f8ff84ed53c956b16d027f7d2926ea631051 by Eric V. Smith in branch 'main': bpo-46762: Fix an assert failure in f-strings where > or < is the last character if the f-string is missing a trailing right brace. (#31365) https://g

[issue45559] pprint tests do not test pprint.pprint()

2022-02-18 Thread Eric V. Smith
Eric V. Smith added the comment: Sure, have a go at it! Any testing of pprint.pprint() would be an improvement, but ideally all options should be tested. It would probably be worthwhile to restructure the tests to run both pformat and pprint tests from the same logic, so that we only need

[issue46792] Indentation now preserved with ruamel.yaml.round_trip_dump

2022-02-18 Thread Eric V. Smith
Eric V. Smith added the comment: This looks like an issue with ruamel.yaml, which is a third party package. You should report it to them. Good luck! -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue46

[issue46792] Indentation not preserved with ruamel.yaml.round_trip_dump

2022-02-18 Thread Eric V. Smith
Change by Eric V. Smith : -- title: Indentation now preserved with ruamel.yaml.round_trip_dump -> Indentation not preserved with ruamel.yaml.round_trip_dump ___ Python tracker <https://bugs.python.org/issu

[issue46757] dataclasses should define an empty __post_init__

2022-02-19 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not crazy about adding a method to every dataclass just for the 0.1% of the times it's needed. I think using hasattr or catching the exception is a better way to go. -- ___ Python track

[issue46757] dataclasses should define an empty __post_init__

2022-02-19 Thread Eric V. Smith
Eric V. Smith added the comment: The fact that it's never been needed in the years that dataclasses and attrs have existed tell me it's kind of a niche requirement. This does not seem like the ugliest code I've ever seen: if hasattr(super(), "__post_init__&

[issue46757] dataclasses should define an empty __post_init__

2022-02-20 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker <https://bugs.python.org/issue46757> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue46757] dataclasses should define an empty __post_init__

2022-02-22 Thread Eric V. Smith
Eric V. Smith added the comment: I'm going to close this issue. As Raymond says, it's a breaking change, and the workaround is easy enough. -- resolution: -> rejected stage: patch review -> resolved status: open -> closed ___

[issue46757] dataclasses should define an empty __post_init__

2022-02-22 Thread Eric V. Smith
Change by Eric V. Smith : -- pull_requests: +29650 pull_request: https://github.com/python/cpython/pull/31523 ___ Python tracker <https://bugs.python.org/issue46

[issue46757] dataclasses should define an empty __post_init__

2022-02-22 Thread Eric V. Smith
Eric V. Smith added the comment: I'm adding a test that mimic's Raymond's example of the proposed addition being a breaking change. This way, if we ever decide to actually add this feature, we'll break this test. If we do decide to continue and make the change anyway,

[issue46757] dataclasses should define an empty __post_init__

2022-02-22 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 288af845a32fd2a92e3b49738faf8f2de6a7bf7c by Eric V. Smith in branch 'main': bpo-46757: Add a test to verify dataclass's __post_init__ isn't being automatically added. (GH-31523) https://github.com/p

[issue46856] datetime.max conversion

2022-02-25 Thread Eric V. Smith
Eric V. Smith added the comment: Please show us how they fail. -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue46856> ___ ___ Python-bug

[issue46856] datetime.max conversion

2022-02-25 Thread Eric V. Smith
Eric V. Smith added the comment: Probably so. You could step through the code to make sure that's what's going on. -- ___ Python tracker <https://bugs.python.o

[issue46900] marshal.dumps represents the same list object differently

2022-03-02 Thread Eric V. Smith
Eric V. Smith added the comment: >From https://github.com/python/cpython/blob/main/Python/marshal.c: 41 is: #define TYPE_SMALL_TUPLE')' The difference between 41 and 169 is 128: #define FLAG_REF'\x80' /* with a type, add obj to index */ S

[issue46904] Python Decimal supports '#' format, C Decimal does not.

2022-03-02 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <https://bugs.python.org/issue46904> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46904] Python Decimal supports '#' format, C Decimal does not.

2022-03-02 Thread Eric V. Smith
Change by Eric V. Smith : -- nosy: +mark.dickinson ___ Python tracker <https://bugs.python.org/issue46904> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue46061] GCState *gcstate = get_gc_state() gives fatal error in Python 3.10.2

2022-03-03 Thread Eric V. Smith
Eric V. Smith added the comment: > I was running one python script Again: you need to show us the script that's causing this problem. I (and millions of others) run scripts all the time which do not fail in the way you describe. Unless you show us a script that causes the problem, w

[issue46061] GCState *gcstate = get_gc_state() gives fatal error in Python 3.10.2

2022-03-03 Thread Eric V. Smith
Eric V. Smith added the comment: I understand. Then I'm going to close this issue, since there's nothing we can do. -- resolution: -> rejected stage: -> resolved status: open -> closed ___ Python tracker <https://bugs

[issue46461] Kodi crashing

2022-03-06 Thread Eric V. Smith
Eric V. Smith added the comment: I don’t have Ubuntu to test on. Plus the steps to reproduce are too much for the average volunteer to work through. I don’t think we’ll be able to help. -- ___ Python tracker <https://bugs.python.org/issue46

[issue46938] dataclass __post_init__ recursion

2022-03-06 Thread Eric V. Smith
Eric V. Smith added the comment: I think this is a bug in the code. I'll have a PR ready shortly. But since it's a non-trivial change, I'm going to target it for 3.11 only. -- assignee: docs@python -> eric.smith versions: -Pytho

[issue46938] dataclass __post_init__ recursion

2022-03-06 Thread Eric V. Smith
Eric V. Smith added the comment: Yeah, I've come to the conclusion that it's not so simple, either. I'm also thinking that advising to call the base __init__ is a mistake. -- ___ Python tracker <https://bugs.pyt

[issue46941] Bug or plug not removed (The operator "is")

2022-03-06 Thread Eric V. Smith
Eric V. Smith added the comment: As others have noted, the behavior is intentional, so I'm closing this. -- nosy: +Dennis Sweeney, Jelle Zijlstra, eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed ___

[issue46949] Print an indication if traceback exceeds sys.tracebacklimit

2022-03-07 Thread Eric V. Smith
Eric V. Smith added the comment: If you go with the second idea, I'd say something like f"More than {2 * tracebacklimit} additional stack frames not shown". It seems handy to know the magnitude of the problem. -- nosy: +eric.smith ___

[issue46945] Quantifier and Expanded Regex Expression Gives Different Results

2022-03-07 Thread Eric V. Smith
Change by Eric V. Smith : -- components: +Regular Expressions -Library (Lib) nosy: +ezio.melotti, mrabarnett ___ Python tracker <https://bugs.python.org/issue46

[issue1009] Implementation of PEP 3101, Advanced String Formatting

2007-08-23 Thread Eric V. Smith
Changes by Eric V. Smith: -- versions: +Python 2.6 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1009> __ ___ Python-bugs-list mailing list Unsubs

[issue1009] Implementation of PEP 3101, Advanced String Formatting

2007-08-25 Thread Eric V. Smith
Eric V. Smith added the comment: Closed, code was checked in revision 57444. -- versions: +Python 3.0 -Python 2.6 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1009] Implementation of PEP 3101, Advanced String Formatting

2007-08-25 Thread Eric V. Smith
Eric V. Smith added the comment: I tried to close it, without success. Possible tracker issue, I'll investigate. It should be closed! __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

[issue1158] %f format for datetime objects

2007-09-13 Thread Eric V. Smith
Eric V. Smith added the comment: It's a nit, but there are a few other comments that should be changed to mention %f in addition to %z/%Z. * giving special meanings to the %z and %Z format codes via a preprocessing /* Scan the input format, looking for %z and %Z escapes, bui

[issue12982] .pyo file cannot be imported

2011-09-14 Thread Eric O. LEBIGOT
New submission from Eric O. LEBIGOT : When creating a .pyo file (either with -O or -OO) and removing any .pyc or .py original file, import complains with "No module called ". The import does work with .pyc files. I'm not sure that this is the correct behavior, as the documen

[issue12982] .pyo file cannot be imported

2011-09-15 Thread Eric O. LEBIGOT
Eric O. LEBIGOT added the comment: Indeed. Thanks. I wish it had been in the documentation. :) This is yet another reason for me to check how I can submit patches to the doc. :) I also found out that renaming the .pyo file as .pyc makes Python happy upon import. That's the solut

[issue13033] recursive chown for shutils

2011-09-23 Thread Eric V. Smith
Eric V. Smith added the comment: See also issue 12191, where there was a brief discussion of this. -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue13

[issue13079] Wrong datetime format in PEP3101

2011-09-30 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the report. Fixed in 9a9bd05b9fca. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue13109] telnetlib insensitive to connection loss

2011-10-05 Thread Eric V. Smith
Eric V. Smith added the comment: Can you post some example code? I would not expect disconnecting the network cable to close any TCP connections, unless you are transmitting data and/or you have keepalives turned on. -- nosy: +eric.smith

[issue13109] telnetlib insensitive to connection loss

2011-10-06 Thread Eric V. Smith
Eric V. Smith added the comment: Assuming that you're unplugging the cable when the code is in the loop that occurs after the line "self.pcPart.write(cmdx)", and also assuming that you haven't turned on keepalives, then the behavior you see is expected. You're just

[issue13143] os.path.islink documentation is ambiguous

2011-10-10 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith, jason.coombs ___ Python tracker <http://bugs.python.org/issue13143> ___ ___ Python-bugs-list mailing list Unsub

[issue11457] os.stat(): add new fields to get timestamps as Decimal objects with nanosecond resolution

2011-10-15 Thread Eric G. Barron
Changes by Eric G. Barron : -- nosy: +ericography ___ Python tracker <http://bugs.python.org/issue11457> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13271] When -h is used with argparse, default values that fail should not matter

2011-10-26 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +bethard, eric.smith ___ Python tracker <http://bugs.python.org/issue13271> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13314] ImportError ImportError: Import by filename, should be deferred until sys.meta_path hooks are processed

2011-11-01 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue13314> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13321] fstat doesn't accept an object with "fileno" method

2011-11-02 Thread Eric V. Smith
Eric V. Smith added the comment: If I understand it correctly, this change request is to change os.fstat(obj) (and probably other functions) to call obj.fileno(), instead of the caller doing that? If so, -1. Keep os.fstat() as a thin wrapper around fstat. -- nosy: +eric.smith

[issue13385] Add an explicit re.NOFLAGS flag value to the re module

2011-11-11 Thread Eric V. Smith
Eric V. Smith added the comment: Since the flags are OR'd together, I don't see what other value the "no flags" parameter could have, other than zero. That said, I don't feel strongly about it, and if it helps re

[issue13386] Document documentation conventions for optional args

2011-11-12 Thread Eric V. Smith
Eric V. Smith added the comment: To your last point, I think it's important to specify the default value placeholder (basically a sentinel) in the documentation. For example, if a function takes -1 to mean "all occurrences", then the caller needs to know how what value to pass

[issue13410] String formatting bug in interactive mode

2011-11-15 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue13410> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith, jason.coombs ___ Python tracker <http://bugs.python.org/issue13412> ___ ___ Python-bugs-list mailing list Unsub

[issue13410] String formatting bug in interactive mode

2011-11-15 Thread Eric V. Smith
Eric V. Smith added the comment: I think this must be a change between 2.5 and 2.6. In 2.5.1 non-debug (Linux) I consistently see: >>> print '%d' % y Traceback (most recent call last): File "", line 1, in TypeError: int argument required In 2.6.5 (Windo

[issue13410] String formatting bug in interactive mode

2011-11-15 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think you're going to want those print statements in a test. You could just evaluate '%d' % y. -- ___ Python tracker <http://bug

[issue13410] String formatting bug in interactive mode

2011-11-15 Thread Eric V. Smith
Eric V. Smith added the comment: With an unpatched 2.7, this fails for me: diff --git a/Lib/test/test_format.py b/Lib/test/test_format.py --- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -289,6 +289,17 @@ else: raise TestFailed, '"%*d"

[issue13410] String formatting bug in interactive mode

2011-11-16 Thread Eric V. Smith
Eric V. Smith added the comment: Interesting! Same here. Using eval() fails with or without -v: --- a/Lib/test/test_format.py +++ b/Lib/test/test_format.py @@ -289,6 +289,18 @@ else: raise TestFailed, '"%*d"%(maxsize, -127) should fail' +

[issue13386] Document documentation conventions for optional args

2011-11-17 Thread Eric V. Smith
Eric V. Smith added the comment: I just ran across the other reason that having the actual default values documented is important. Sometimes I want to do this: some_func(param if some_condition else ) If some_condition is False, I want the default behavior, if not, I want to pass in a

[issue13433] String format documentation contains error regarding %g

2011-11-19 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue13433> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2011-11-20 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not sure why this is being reopened. Unless there's been a discussion I'm not aware of, the change is still not worth the disruption it would cause. And in any event, it can only be addressed in new (as yet unreleased) versions of python.

[issue10621] >>> 1 + 2j --> (1 + 2j) and not (1+2j)

2011-11-21 Thread Eric V. Smith
Eric V. Smith added the comment: I'm -1 on this change. I think all the core devs who have commented on it here are -1 or -0. If you really want to lobby for this change, I suggest starting a discussion on python-dev. My position is that I think it would indeed look nicer, but the bre

[issue13450] add assertions to implement the intent in ''.format_map test

2011-11-21 Thread Eric V. Smith
Changes by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker <http://bugs.python.org/issue13450> ___ ___ Python-bugs-list mailing list Unsubscri

[issue13450] add assertions to implement the intent in ''.format_map test

2011-11-22 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think the existing tests have any value. I might leave one of them, but I think I'll just use your new tests instead. akira: I'd like to add your name to the Misc/ACKS file, if it's not already there. What's your full name?

[issue13535] Improved two's complement arithmetic support: to_signed() and to_unsigned()

2011-12-05 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue13535> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13579] string.Formatter doesn't understand the !a conversion specifier

2011-12-11 Thread Eric V. Smith
Changes by Eric V. Smith : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue13579> ___ ___ Python-bugs-list mai

[issue13598] string.Formatter doesn't support empty curly braces "{}"

2011-12-15 Thread Eric V. Smith
Eric V. Smith added the comment: This bug is assigned to me. Sometimes it takes a while before a committer has time to review a bug and act on it. I can assure you that I will review this before the next release of Python. Thank you for the bug report, and especially thanks for the patch

[issue12014] str.format parses replacement field incorrectly

2011-12-15 Thread Eric V. Smith
Changes by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker <http://bugs.python.org/issue12014> ___ ___ Python-bugs-list mailing list Unsubscri

[issue13685] argparse does not sanitize help strings for % signs

2011-12-30 Thread Eric V. Smith
Eric V. Smith added the comment: This is because the help text support substitution, as mentioned here: http://docs.python.org/dev/library/argparse.html#help It's possible this documentation could be improved. -- assignee: -> docs@python components: +Documentation -None nos

[issue13685] argparse does not sanitize help strings for % signs

2012-01-02 Thread Eric V. Smith
Eric V. Smith added the comment: In case I wasn't clear, I mean that the help string supports %-formatting variable expansion, such as "%(default)s". I think it would be good if a sentence were added to the end of the "help" section, saying something like: Because

[issue13706] non-ascii fill characters no longer work in numeric formatting

2012-01-03 Thread Eric V. Smith
Eric V. Smith added the comment: I assume this is left over from the PEP 393 changes. I think the right thing to do is delete this code from line 277 of formatter_unicode.c: if (format->fill_char > 127 || format->align > 127 || format->sign > 127) {

[issue13718] Format Specification Mini-Language does not accept comma for percent value

2012-01-06 Thread Eric V. Smith
Changes by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker <http://bugs.python.org/issue13718> ___ ___ Python-bugs-list mailing list Unsubscri

[issue13742] Add a key parameter (like sorted) to heapq.merge

2012-01-09 Thread Eric V. Smith
Changes by Eric V. Smith : -- assignee: -> rhettinger ___ Python tracker <http://bugs.python.org/issue13742> ___ ___ Python-bugs-list mailing list Unsubscri

[issue13718] Format Specification Mini-Language does not accept comma for percent value

2012-01-09 Thread Eric V. Smith
Eric V. Smith added the comment: Good point. I hadn't looked at the string closely enough. Closing. -- resolution: -> invalid stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pyth

[issue13755] str.endswith and str.startswith do not take lists of strings

2012-01-10 Thread Eric V. Smith
Eric V. Smith added the comment: It seems like a set would make more sense than a tuple. And if tuples, why not lists? Not that it matters much, since I doubt it's worth changing in either case. It's easy enough for the caller to convert. -- nosy: +

[issue13776] formatter_unicode.c still assumes ASCII

2012-01-12 Thread Eric V. Smith
Eric V. Smith added the comment: This is a duplicate of issue 13706. -- nosy: +eric.smith resolution: -> duplicate stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue13706] non-ascii fill characters no longer work in formatting

2012-01-12 Thread Eric V. Smith
Eric V. Smith added the comment: Sorry for the off-the-cuff diagnosis. I had assumed this was the unintended result of the conversion, but of course I'm wrong. I'd like to fix this. -- nosy: +Jim.Jewett ___ Python tracker <http://bu

[issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other"

2011-05-26 Thread Eric V. Smith
New submission from Eric V. Smith : http://docs.python.org/library/decimal.html In 9.4.2, "Decimal objects", some of the methods mention the first and second parameters, when really it should be "self" and the argument, usually named "other" and sometimes

[issue12188] PEP 7, C style: add ++ policy and explanation

2011-05-26 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue12188> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12191] Shutil - add chown() in order to allow to use user and group name (and not only uid/gid)

2011-05-26 Thread Eric V. Smith
Eric V. Smith added the comment: As a new feature, it can't be added to 2.7. -- nosy: +eric.smith ___ Python tracker <http://bugs.python.org/issue12191> ___ ___

[issue12185] Decimal documentation lists "first" and "second" arguments, should be "self" and "other"

2011-05-28 Thread Eric V. Smith
Eric V. Smith added the comment: I'm not talking about the method itself but rather the descriptive text. For example: copy_sign(other) Return a copy of the first operand with the sign set to be the same as the sign of the second operand. There is no second operand, unles

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Eric V. Smith
Eric V. Smith added the comment: PEP 3101 defines format strings as intermingled character data and markup. Markup defines replacement fields and is delimited by braces. Only after markup is extracted does the PEP talk about interpreting the contents of the markup. So, given "{0[a}b]}

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Eric V. Smith
Eric V. Smith added the comment: The intermingling of character data and markup is far from irrelevant: that's exactly what str.format() does! I don't see how it can be irrelevant to a discussion of how the string is parsed. Note that there are no restrictions, in general, on w

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Eric V. Smith
Eric V. Smith added the comment: >From the PEP: "Format strings consist of intermingled character data and >markup." -- ___ Python tracker <http://bugs.py

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Eric V. Smith
Eric V. Smith added the comment: """ >>> d = {"{0}": "spam"} >>> # a matched pair of braces. What's inside is considered markup. ... >>> "{0}".format(d) "{'{0}': 'spam'}" >>> # a

<    36   37   38   39   40   41   42   43   44   45   >