[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 Unsubscribe: http

[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

[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.org/issue1009

[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, building

[issue1600] str.format() produces different output on different platforms (Py30a2)

2008-02-17 Thread Eric V. Smith
Eric V. Smith added the comment: The PEP 3101 float formatting code (in Objects/stringlib/formatter.h) uses PyOS_ascii_formatd for all specifier codes except 'n'. So applying the patch would fix the issue that was originally brought up in msg58485. I think the approach of the patch (if not its

[issue11957] re.sub problem with unicode string

2011-04-29 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: The 4th parameter to re.sub() is a count, not flags. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11957

[issue11967] Left shift and Right shift for floats

2011-05-01 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11967 ___ ___ Python-bugs-list

[issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character

2011-05-02 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: This patch seems okay to me, as far as it goes. I'd like to hear Martin's feedback, but I think it should be committed. And I realize the rest of this message doesn't apply to the patch, but it does address other problems

[issue12004] PyZipFile.writepy gives internal error on syntax errors

2011-05-05 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: Could you incorporate the test into Lib/test/test_zipfile? Thanks! -- components: +Library (Lib) nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12004

[issue12014] str.format parses replacement field incorrectly

2011-05-06 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: I haven't had time to completely review this, I will do so later today. But let me just say that the string is first parsed for replacement strings inside curly braces. There's no issue with that, here. Next, the string is parsed

[issue12014] str.format parses replacement field incorrectly

2011-05-06 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: but makes me think that treating ! and : in the index field separately is definitely wrong. But it doesn't know they're in an index field when it's doing the parsing for ':' or '!'. It might be possible to change this so that the field

[issue12014] str.format parses replacement field incorrectly

2011-05-06 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: Note also that the nested expansion is only allowed in the format_spec part, per the documentation. Your last examples are attempting to do it in the field_name, which leads to the errors you see. Your very last example doesn't look right

[issue11072] Add MLSD command support to ftplib

2011-05-06 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: Yes, I think this should be committed. I think the API is reasonable, which is the primary concern. If there are implementation bugs, they can be addressed as they're found. -- ___ Python tracker

[issue12084] os.stat() on windows doesn't consider relative symlink

2011-05-16 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith, jaraco ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12084 ___ ___ Python-bugs

[issue12127] Inconsistent leading zero treatment

2011-05-20 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12127 ___ ___ Python-bugs-list

[issue12127] Inconsistent leading zero treatment

2011-05-20 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: I don't buy the confusion with other languages argument. It's a different language. People know that. I'd like to see leading zeros allowed for integer literals, but I don't feel strongly about it, so +0. I'd mainly use them for tables

[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 e...@trueblade.com: 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 something more specific

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

2011-05-26 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12188 ___ ___ Python-bugs-list

[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 e...@trueblade.com added the comment: As a new feature, it can't be added to 2.7. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org 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 e...@trueblade.com 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

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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

[issue13143] os.path.islink documentation is ambiguous

2011-10-10 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith, jason.coombs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13143 ___ ___ Python

[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 e...@trueblade.com: -- nosy: +bethard, eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13271 ___ ___ Python-bugs

[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 e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13314 ___ ___ Python-bugs-list

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

2011-11-02 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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

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

2011-11-11 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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 readability I'm not opposed

[issue13386] Document documentation conventions for optional args

2011-11-12 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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

[issue13410] String formatting bug in interactive mode

2011-11-15 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13410 ___ ___ Python-bugs-list

[issue13412] No knowledge of symlinks on Windows

2011-11-15 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith, jason.coombs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13412 ___ ___ Python

[issue13410] String formatting bug in interactive mode

2011-11-15 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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 stdin, line 1, in module TypeError: int argument required In 2.6.5 (Windows via

[issue13410] String formatting bug in interactive mode

2011-11-15 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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 rep...@bugs.python.org http://bugs.python.org/issue13410

[issue13410] String formatting bug in interactive mode

2011-11-15 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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

[issue13410] String formatting bug in interactive mode

2011-11-16 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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' +def

[issue13386] Document documentation conventions for optional args

2011-11-17 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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 use the default value) If some_condition is False, I want the default

[issue13433] String format documentation contains error regarding %g

2011-11-19 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13433 ___ ___ Python-bugs-list

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

2011-11-20 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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 e...@trueblade.com 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

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

2011-11-21 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- assignee: - eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13450 ___ ___ Python-bugs

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

2011-11-22 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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? Thanks

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

2011-12-05 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13535 ___ ___ Python-bugs-list

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

2011-12-11 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- assignee: - eric.smith nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13579

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

2011-12-15 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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

[issue12014] str.format parses replacement field incorrectly

2011-12-15 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- assignee: - eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12014 ___ ___ Python-bugs

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

2011-12-30 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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

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

2012-01-02 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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 the help

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

2012-01-03 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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 e...@trueblade.com: -- assignee: - eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13718 ___ ___ Python-bugs

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

2012-01-09 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- assignee: - rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13742 ___ ___ Python-bugs

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

2012-01-09 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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 rep...@bugs.python.org http

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

2012-01-10 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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: +eric.smith

[issue13776] formatter_unicode.c still assumes ASCII

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

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

2012-01-12 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com 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 rep

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-14 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: I agree it's not the best error message. What's happening is that these types (list, tuple, etc.) do not implement __format__, so object.__format__ is used. It returns str(self). Then the resulting string is formatted with the given

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-16 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: Changing to a documentation issue. -- assignee: eric.smith - docs@python components: +Documentation -Interpreter Core keywords: +easy nosy: +docs@python versions: +Python 2.7 ___ Python tracker rep

[issue13811] In str.format an incorrect alignment option doesn't make fill char and onself absent

2012-01-17 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: What is the expected output, and why? I think the error message might be incorrect, possibly it should be invalid format specifier. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org

[issue13811] In str.format an incorrect alignment option doesn't make fill char and onself absent

2012-01-18 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: I'm not sure what you're saying here. Is it that 'xx' should be ignored? The documentation says that 'xx' isn't fill and alignment, not that they don't exist. If they're not fill and alignment, then the format string is in error

[issue13811] In str.format an incorrect alignment option doesn't make fill char and onself absent

2012-01-18 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: The only error is the text of the ValueError. I'll look into fixing that. These characters will not be ignored. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13811

[issue13811] In str.format, if invalid fill and alignment are specified, the text of the ValueError message is misleading.

2012-01-18 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: Changing to 3.3: I don't think applying this to 3.2 would be appropriate. -- assignee: - eric.smith keywords: +easy priority: normal - low stage: - needs patch title: In str.format an incorrect alignment option doesn't make fill char

[issue13811] In str.format, if invalid fill and alignment are specified, the text of the ValueError message is misleading.

2012-01-18 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: As I look at it a little closer, I think I'm going to change the message to: Invalid format type specified. The code has determined that instead of a type that's a single character long, it's received xx10d. That's because xx doesn't match

[issue13811] In str.format, if invalid fill and alignment are specified, the text of the ValueError message is misleading.

2012-01-18 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: The existing exceptions use the text format code for what the documentation calls type: format(9, h) Traceback (most recent call last): File stdin, line 1, in module ValueError: Unknown format code 'h' for object of type 'int' So

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-20 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: I don't think {} is the correct way to document this. These all have an empty format specifier: {}.format(foo) {:}.format(foo) {0}.format(foo) {0:}.format(foo) {name}.format(name=foo) format(foo, ) format(foo) That is, they all call foo

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-21 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: While looking at object.__format__, I recall that we've already addressed this, sort of. For a different reason, this is already deprecated in 3.3 and will become an error in 3.4. See issues 9856 and 7994. $ ./python -Wd Python 3.3.0a0

[issue13790] In str.format an incorrect error message for list, tuple, dict, set

2012-01-21 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: The error message will be: non-empty format string passed to object.__format__. I agree with your comment about Terry's patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue13838] In str.format {0:#.5g} for decimal.Decimal doesn't print trailing zeros

2012-01-22 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: See issue #7098 for a discussion. I propose to close this issue. -- nosy: +eric.smith, mark, skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13838

[issue13838] In str.format {0:#.5g} for decimal.Decimal doesn't print trailing zeros

2012-01-22 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +mark.dickinson -mark ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13838 ___ ___ Python

[issue13838] In str.format {0:#.5g} for decimal.Decimal doesn't print trailing zeros

2012-01-23 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- resolution: - duplicate status: open - closed superseder: - Add alternate float formatting styles to new-style formatting. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13838

[issue13889] str(float) and round(float) issues with FPU precision

2012-01-27 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith, mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13889

[issue13882] Add format argument for time.time(), time.clock(), ... to get a timestamp as a Decimal object

2012-01-27 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13882 ___ ___ Python-bugs-list

[issue13922] argparse handling multiple -- in args improperly

2012-02-02 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +bethard, eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13922 ___ ___ Python-bugs

[issue13927] Extra spaces in the output of time.ctime

2012-02-02 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: That's definitely the expected behavior. It's the same as the C library version of ctime(). But I couldn't find it documented in the Python docs, so I'm changing this to a documentation issue. Thanks for the report. -- assignee

[issue11122] bdist_rpm should use rpmbuild, not rpm

2012-12-09 Thread Eric V. Smith
Eric V. Smith added the comment: I agree on just switching to rpmbuild, at least for 3.4. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11122

[issue16675] Ship Python with a package manager

2012-12-13 Thread Eric V. Smith
Eric V. Smith added the comment: Because this is a new feature, it could only be added to Python 3.4. Changing versions. -- components: +Installation nosy: +eric.smith type: behavior - enhancement versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5

[issue9856] Change object.__format__(s) where s is non-empty to a TypeError

2012-12-23 Thread Eric V. Smith
Eric V. Smith added the comment: The more I think about this, the more overly restrictive I realize it is. If the type of the object really is object, then it can use string formatting. It's only for non-objects that I want to add the error. I'll re-open it and give it some more thought

[issue7300] Unicode arguments in str.format()

2012-12-30 Thread Eric V. Smith
Eric V. Smith added the comment: I agree that we should close this as won't fix in 2.7. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7300

[issue16047] Tools/freeze no longer works in Python 3

2013-01-02 Thread Eric V. Smith
Eric V. Smith added the comment: What Barry said. :) I haven't had time to check yet: but why does site.py need the __file__ attribute? Maybe that's the actual problem. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16047

[issue16944] German number separators not working using format language and locale de_DE

2013-01-14 Thread Eric V. Smith
Eric V. Smith added the comment: I think this issue should be closed, since we're doing as we're instructed by the OS. If someone wants to open a new issue for the m format specifier type, I'd support that. -- nosy: +eric.smith ___ Python tracker

[issue16977] argparse: mismatch between choices parsing and usage/error message

2013-01-17 Thread Eric V. Smith
Eric V. Smith added the comment: Isn't this really just an inappropriate use of a string instead of a list? If indeed this is in the documentation, it should be changed. I still don't like: p.add_argument('a', choices=list('abc')) but at least it would work. This call to list() could be done

[issue17005] Add a topological sort algorithm

2013-01-20 Thread Eric V. Smith
Eric V. Smith added the comment: +1 I'll note (by inspection only) your example code doesn't work under Python 3.x! :) (print as a statement) -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17005

[issue3982] support .format for bytes

2013-01-23 Thread Eric V. Smith
Eric V. Smith added the comment: I think ''.join() will always be faster than ''.format(), for a number of reasons (some already stated): - it doesn't have to pass the format string - it doesn't have to do the __format__ lookup and call the resulting function (although I believe there's

[issue3982] support .format for bytes

2013-01-23 Thread Eric V. Smith
Eric V. Smith added the comment: I retract the datetime comment. Given what we're trying to accomplish, I think we only need to support types that are supported by 2.7's %-formatting. -- ___ Python tracker rep...@bugs.python.org http

[issue3982] support .format for bytes

2013-01-23 Thread Eric V. Smith
Eric V. Smith added the comment: So it sounds like the use case is (as Glyph said in msg180432): - Provide a transition for users of 2.7's of str %-formatting into a style that's compatible with both str in 2.7 and bytes in 3.4. In that case the only options I see are to implement __mod__

[issue17174] Posix os.path.join should raise TypeError when passed unusable type

2013-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: I think this change should not be made: it's a slippery slope, because there are thousands of places in the stdlib where a similar change could be made. It's the nature of duck typing that you're not going to get a great error message everywhere you pass

[issue4591] 32-bits unsigned user/group identifier

2013-02-11 Thread Eric V. Smith
Eric V. Smith added the comment: +1 for PyIndex_AsLong() -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4591 ___ ___ Python

[issue14905] zipimport.c needs to support namespace packages when no 'directory' entry exists

2013-02-17 Thread Eric V. Smith
Eric V. Smith added the comment: I don't think such files are common: I've never seen such a file in the wild. I created one, by accident, while testing PEP 420. OTOH, it was surprisingly easy to create the malformed file with zipfile

[issue17247] int and float should detect inconsistent format strings

2013-02-19 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17247 ___ ___ Python-bugs-list

[issue17259] locale.format() rounding is not reliable for floats

2013-02-20 Thread Eric V. Smith
Eric V. Smith added the comment: Mark is the ultimate authority here, but my recollection is (and a quick scan of the code shows) that half to even rounding is used in all of our float to string conversions. So that includes %f and float.__format__, among others

[issue17267] datetime.time support for '+' and 'now'

2013-02-21 Thread Eric V. Smith
Eric V. Smith added the comment: What would this give: tm = datetime.time(13, 20) later = tm + datetime.timedelta(hours=47, minutes=44) datetime.time(13, 4)? Or raise an exception? I've thought about this before, but it's always a problem when going over date boundaries. If you define

[issue17259] Document round half to even rule for floats

2013-02-23 Thread Eric V. Smith
Eric V. Smith added the comment: I've just looked through the code for 2.7. It uses short float repr for both %-formatting and for float.__format__. So they both use Gay's code, and both should work the same as they do in 3.2+. In all cases, round-half-to-even is used. It's 2.6 that uses

[issue17280] path.basename and ntpath.basename functions returns an incorrect file name in Windows 7

2013-02-23 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17280

[issue17292] Autonumbering in string.Formatter doesn't work

2013-02-25 Thread Eric V. Smith
Eric V. Smith added the comment: This is a duplicate of issue 13598. I'll add you to nosy over there. -- resolution: - duplicate stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org

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

2013-02-25 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +binkert ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13598 ___ ___ Python-bugs-list

[issue17336] Complex number representation round-trip doesn't work with signed zero values

2013-03-02 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17336 ___ ___ Python-bugs-list

[issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse)

2013-03-14 Thread Eric V. Smith
Eric V. Smith added the comment: Evgeny: I completely agree. It's unfortunate that argparse doesn't work that way. However, I think it's too late to change this behavior without adding a new parser. I don't think existing argparse can be changed to not operate the way it does, due

[issue17457] Unittest discover fails with namespace packages and builtin modules

2013-03-18 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17457 ___ ___ Python-bugs-list

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: From the PEP: Format strings consist of intermingled character data and markup. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12014

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: d = {{0}: spam} # a matched pair of braces. What's inside is considered markup. ... {0}.format(d) {'{0}': 'spam'} # a matched pair of braces. Inside is a matched pair of braces, and what's inside of that is not considered markup. I'm

[issue12014] str.format parses replacement field incorrectly

2011-06-03 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: We're going to have to agree to disagree. I believe that {0[}]} is the markup {0[} followed by the character data ]}. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12014

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

2011-06-07 Thread Eric V. Smith
Eric V. Smith e...@trueblade.com added the comment: But don't you think we should put information like this somewhere, even if it's not in PEP 7? We've had a discussion about this particular issue (idiomatic pointer increments when appending to a buffer) at least twice, and there's also

[issue12342] characters with ord above 65535 fail to display in IDLE

2011-06-15 Thread Eric V. Smith
Changes by Eric V. Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12342 ___ ___ Python-bugs-list

  1   2   3   4   5   6   7   8   9   10   >