[issue7117] Backport py3k float repr to trunk

2009-10-24 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Adding tim_one as nosy. He'll no doubt have an opinion on rounding. And hopefully he'll share it! -- nosy: +tim_one ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7117

[issue7117] Backport py3k float repr to trunk

2009-10-24 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Another thing to consider is that in py3k we removed all conversions of converting 'f' to 'g', such as this, from Objects/unicodeobject.c: if (type == 'f' fabs(x) = 1e50) type = 'g'; Should we also do that as part of this exercise

[issue6882] uuid creates zombies

2009-10-23 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Changed py3k version to use contextlib.closing in r75625. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6882

[issue6882] uuid creates zombies

2009-10-23 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- priority: - normal type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6882

[issue6882] uuid creates zombies

2009-10-22 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Back ported the try/finally parts to trunk in r75620. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6882

[issue7168] Document PyFloat_AsString and PyFloat_AsReprString as deprecated and unsafe

2009-10-19 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- assignee: georg.brandl - eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7168 ___ ___ Python

[issue7168] Document PyFloat_AsString and PyFloat_AsReprString as deprecated and unsafe

2009-10-19 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Proposed patch attached. -- keywords: +patch stage: - patch review Added file: http://bugs.python.org/file15164/issue7168.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org

[issue7168] Document PyFloat_AsString and PyFloat_AsReprString as deprecated and unsafe

2009-10-19 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Updated patch based on Georg's input. -- Added file: http://bugs.python.org/file15166/issue7168.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7168

[issue7168] Document PyFloat_AsString and PyFloat_AsReprString as deprecated and unsafe

2009-10-19 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: Removed file: http://bugs.python.org/file15164/issue7168.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7168

[issue7168] Document PyFloat_AsString and PyFloat_AsReprString as deprecated and unsafe

2009-10-19 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: A slightly improved version checked in as r75510. -- resolution: - accepted stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue7168] Document PyFloat_AsString and PyFloat_AsReprString as deprecated and unsafe

2009-10-18 Thread Eric Smith
New submission from Eric Smith e...@trueblade.com: These functions are unsafe and I'd like to delete them. They've already been deleted in py3k, per PEP 3100. They are no longer used internally to the interpreter. They should be documented as deprecated and as unsafe. They write to a char

[issue7094] Add alternate float formatting styles to new-style formatting.

2009-10-09 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I'm adding 2.7. Since 2.7 and 3.2 share the same code base, I'd rather add it to both if we're going to do it at all. -- assignee: - eric.smith versions: +Python 2.7 ___ Python tracker rep

[issue7081] formatting behaving like = formatting

2009-10-08 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I think they're the same issue, relating to what happens if there's an alignment specifier supplied along with '0'. I'm planning on working on this issue this weekend and I'll verify if it's the same problem

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-08 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: That wording is okay with me. Maybe run it by Georg to see if he has any suggestions? Or just check it in and see if anyone complains. But I'm okay with it as-is. Thanks for doing this. Eric

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-08 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I obviously hadn't thought of those cases, either. This version looks good(er) to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7051

[issue7051] 'g'/'G' format docs need a little more explanation

2009-10-07 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Mark's really the expert here, so I trust his description. Is his description layman-speak enough for the docs? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7051

[issue6985] range() fails with long integers

2009-09-24 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: This doesn't crash the interpreter, so I'm changing it to behavior. The number of items in a range() must fit into a native int. What are you doing with the range? Could you use xrange instead? -- nosy: +eric.smith resolution: - wont

[issue6958] Add Python command line flags to configure logging

2009-09-21 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6958 ___ ___ Python-bugs-list mailing

[issue6958] Add Python command line flags to configure logging

2009-09-21 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: The C code looks basically okay to me. I'd probably use strdup() instead of the malloc/strlen/strcpy calls. And as Thomas said, the cleanup needs a little bit of work. -- ___ Python tracker rep

[issue6882] uuid creates zombies

2009-09-18 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I checked in a slightly modified version of Marcin's patch in py3k (r74907) and release31-maint (r74909). I modified the patch to keep the same style as the rest of the module. I'll now work on back-porting all of the try/finally code to trunk

[issue6882] uuid creates zombies

2009-09-17 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: The patch looks okay to me, and solves the issue on my Fedora box. But perhaps a context manager in a with block would be clearer? I've attached a patch. -- Added file: http://bugs.python.org/file14908/issue6882-contextlib.diff

[issue6882] uuid creates zombies

2009-09-17 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: The py3k version of the file already contains 3.x only code, and it's missing the comment at the top that it should be compatible. But it's not really a big deal to me. The py3k version also already has some try/finally logic on some popen calls

[issue6882] uuid creates zombies

2009-09-17 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Indeed, the code that introduced this bug was in r68489, so it was written after Guido went through the module and cleaned it up to use try/finally. And since r68489 was a merge of r68487, the change was originally made on the 2.x version (which

[issue6882] uuid creates zombies

2009-09-17 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Yes, I'll take care of this. I can't think of any way to add a test that the zombie process doesn't exist, but if anyone has an idea I'd like to hear about it. -- ___ Python tracker rep

[issue6902] Built-in types format incorrectly with 0 padding.

2009-09-14 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: complex will also need to be addressed. The second error message is misleading, for the same reason the formatting on float and int is incorrect: format(3-2j, 030) Traceback (most recent call last): File stdin, line 1, in module ValueError

[issue6882] uuid creates zombies

2009-09-13 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6882 ___ ___ Python-bugs-list

[issue6882] uuid creates zombies

2009-09-13 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6882 ___ ___ Python-bugs-list mailing

[issue6902] Built-in types format incorrectly with 0 padding.

2009-09-13 Thread Eric Smith
New submission from Eric Smith e...@trueblade.com: Originally discussed in issue 6871. Even if an alignment of is specified, = is used if the padding character is 0. format(2, '020') '0002' format(2, '120') '2111' This is a problem for at least float

[issue6871] decimal.py: more format issues

2009-09-13 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Created issue 6902 to handle #4. The others will need to be broken out into their own issues if we want to fix them. I can't keep track of multiple issues in one bug report. -- ___ Python tracker rep

[issue6872] Support system readline on OS X 10.6

2009-09-10 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6872 ___ ___ Python-bugs-list mailing

[issue6871] decimal.py: more format issues

2009-09-09 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: For #1 for floats, 2.6 is in error. This has been fixed in 2.7 (trunk). For #2, I think float is correct. The PEP says the specifier is: [[fill]align][sign][#][0][minimumwidth][.precision][type] so '00' is parsed as minimumwidth=0 with zero

[issue6871] decimal.py: more format issues

2009-09-09 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Also, see issue 4482 for a discussion of float formatting for nan and inf. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6871

[issue6857] float().__format__() default alignment

2009-09-08 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Thanks for the decimal work, Mark. I notice that complex is also left aligned, by default. I'll take a look at that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6857

[issue6713] Integer Long types: Performance improvement of 1.6x to 2x for base 10 conversions

2009-09-07 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6713 ___ ___ Python-bugs-list mailing

[issue6850] decimal.py: format_dict['type'] not initialized

2009-09-07 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6850 ___ ___ Python-bugs-list mailing

[issue6850] decimal.py: format_dict['type'] not initialized

2009-09-07 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: The test as written will always give an error for None. I think the better fix is to change it to be: if format_dict['type'] is None or format_dict['type'] in 'gG': That fixes this particular exception, but since the format specifier is invalid

[issue6850] decimal.py: format_dict['type'] not initialized

2009-09-07 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- components: +Library (Lib) type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6850

[issue6850] decimal.py: format_dict

2009-09-07 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: The format string is valid. Sorry for the noise. The fill character of 'a' threw me off. With my suggested change to decimal.py, line 5595, in py3k: from decimal import * format(Decimal(0.12345), a=-7.0) '0.1' format(0.12345, a=-7.0

[issue6857] float().__format__() default alignment

2009-09-07 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: That is interesting. I'd agree that it's a bug in the PEP. Note that %-formatting right aligns floats by default: '%7.0g' % 0.12345 '0.1' I'll raise the issue on python-dev. Eric. -- assignee: - eric.smith

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-09-02 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I plan to look at this, and if it looks okay, commit it. Let me know if anyone has any remaining issues. -- nosy: +eric.smith versions: +Python 3.2 -Python 3.1 ___ Python tracker rep...@bugs.python.org

[issue1578269] Add os.link() and os.symlink() and os.path.islink() support for Windows

2009-09-02 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- assignee: - eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1578269 ___ ___ Python-bugs

[issue6579] No update about automatic numbering of fields in format strings (e.g. 'A {} with {} buttocks')

2009-09-02 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: This is a duplicate of issue 6813, where it has been fixed. I'm closing it. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6579

[issue6813] update format() documentation and tutorial

2009-09-01 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: 2.7 does not support the !a conversion specifier. It's only available in 3.1 and above. It's because ascii() is a 3.x only builtin. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http

[issue6813] update format() documentation and tutorial

2009-09-01 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Never mind, I see that you didn't add the !a docs to trunk. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6813

[issue6802] build fails on Snow Leopard

2009-08-29 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6802 ___ ___ Python-bugs-list mailing

[issue6762] strange string representation of xrange in print

2009-08-22 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: For types where it's possible, the str or repr returns a string that can be passed to eval: for i in eval(str(xrange(5))): ... print i ... 0 1 2 3 4 xrange (and list, and tuple, and others) fall into this category. -- nosy

[issue6740] Compounded expressions with lambda functions are evaluated incorrectly

2009-08-20 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: This isn't the right forum to ask for help. You should try comp.lang.python, where someone would be happy to explain this to you. Having said that, here's the explanation: This is not a bug. Disregarding side effects, the expression: a = b or c

[issue6714] memmove fails with unicode strings

2009-08-16 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: What platform is this on? For a ucs4 platform, that is what I'd expect the result to be. Check sys.maxunicode to see if you have a ucs2 or ucs4 build. What do you expect as the result? Remember that memmove takes a count of bytes

[issue6714] memmove fails with unicode strings

2009-08-16 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- resolution: - invalid stage: - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6714

[issue6705] '''3, 5'''.strip(r''', ''') does not strip comma, returns '3, 5'

2009-08-14 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Good advice from R. David. In addition, you'll find the help command useful: help(''.strip) Help on built-in function strip: strip(...) S.strip([chars]) - string or unicode Return a copy of the string S with leading and trailing

[issue6630] string.Template custom pattern not working

2009-08-03 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I agree with Raymond. I think it should either take a string and flags, or a compiled regex object. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6630

[issue6632] Include more fullwidth chars in the decimal codec

2009-08-03 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6632 ___ ___ Python-bugs-list mailing

[issue6330] trunk does not build with --enable-unicode=ucs4

2009-07-30 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Fixed in r74269 (trunk). Code copied to py3k, just so the code stays in sync, in r74271. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep

[issue6579] No update about automatic numbering of fields in format strings (e.g. 'A {} with {} buttocks')

2009-07-30 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: In http://docs.python.org/3.1/library/string.html#format-string-syntax, the auto-numbering is mentioned, in the sentence that starts If the numerical arg_names in a format string are 0, 1, 2, ... in sequence, they can all be omitted. It's true

[issue6595] Make Decimal constructor accept all unicode decimal digits in input.

2009-07-29 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: +1 The standard recommends it, and the other numeric types support it, so Decimal should as well. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6595

[issue6595] Make Decimal constructor accept all unicode decimal digits in input.

2009-07-29 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Since you're calling int() on the result, can't this code: self._int = str(int((intpart+fracpart).lstrip('0') or '0')) just be: self._int = str(int(intpart+fracpart)) ? And here, you already know diag is not None, so do you need the or '0' part

[issue6561] Regex '\d' should not match unicode category 'No'.

2009-07-24 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6561 ___ ___ Python-bugs-list mailing

[issue6567] Isn't inf almost equal to inf?

2009-07-24 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6567 ___ ___ Python-bugs-list mailing

[issue5864] format(1234.5, '.4') gives misleading result

2009-07-07 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I agree that backporting it to 2.6 would be nice, but it would be a huge change. There's too much risk involved. So this will just be a new feature in 2.7. It's already in Misc/NEWS, so you're all set there. I'm closing the issue, marking

[issue6427] Rename float*.[ch] to double.[ch]

2009-07-06 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: -1 The time to change this was 3.0, if it was ever needed. It would break too much code now. We could develop some strategy using macros, but I just don't think it's worth it. And as Amaury points it, the type is known in python as float, so

[issue6428] TypeError: __bool__ should return bool or int, returned int

2009-07-06 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: The patch looks good to me. In particular, removing the test for using_len looks correct. The assignment of result = -1 after PyErr_Format isn't needed, but doesn't hurt (and it was already there, anyway). -- keywords: -needs review

[issue6387] floor division gives different result for int versus float.

2009-06-30 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I agree with Mark: -1. Do you have any specific use cases where this has caused problems, or is this academic? Maybe you can get some support for this on python-ideas, but I suggest we close it in the meantime

[issue6330] trunk does not build with --enable-unicode=ucs4

2009-06-23 Thread Eric Smith
New submission from Eric Smith e...@trueblade.com: This was reported a few weeks ago by Benjamin Peterson, but I haven't gotten around to fixing it. This is a reminder to myself to do it. This is due to a bug in Objects/stringlib/formatter.h. Before I fix it trunk, I need to backport some 3.1

[issue6316] format, str.format don't work well with datetime, date object

2009-06-20 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- assignee: - eric.smith components: +Interpreter Core -Extension Modules, Library (Lib) nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6316

[issue6316] format, str.format don't work well with datetime, date object

2009-06-20 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: This is by design. Where d is a datetime, format(d, format_string) returns d.strftime(format_string). d.strftime('30') '30' -- resolution: - invalid status: open - closed ___ Python tracker rep

[issue6208] path separator output ignores shell's path separator: / instead of \

2009-06-15 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: So is this a cosmetic issue or a functional issue? It's a cosmetic issue. Also, even if it could figure that out, how would it know whether a particular filename stringification with os.path.join() was intended for display to the user

[issue6208] path separator output ignores shell's path separator: / instead of \

2009-06-15 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Tim Golden wrote: Just for information's sake, the shell APIs usually only accept backslashes. That's good to know. Do you have any specific examples? CreateFile and the like, which is where my experience is, take either. 90% of my Windows

[issue6247] should we include argparse

2009-06-12 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: It's unfortunate (at least to me, but I know I have a skewed view of this) that the help string in add_argument uses %-formatting when formatting the result. I'd much rather it use str.format(). I see a couple of options: - leave

[issue6247] should we include argparse

2009-06-10 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I'll take a look at it. I've been meaning to use argparse, anyway. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6247

[issue6198] test_float fails on Windows

2009-06-09 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: In r73314, I restored the one test erroneously removed (%#.0f 1.5 - 2.). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6198

[issue6198] test_float fails on Windows

2009-06-05 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6198 ___ ___ Python-bugs-list mailing

[issue6198] test_float fails on Windows

2009-06-05 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I can duplicate this with Visual C++ 9.0 Express Edition on XP. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6198

[issue6198] test_float fails on Windows

2009-06-05 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Yes, this test passes on py3k on my Windows box. That would be a nightmare if it didn't! I agree that this is a test problem, not a code problem. I suggest we just remove the offending line from formatfloat_testcases.txt in trunk. I can do

[issue6198] test_float fails on Windows

2009-06-05 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I had to remove a bunch of tests. Some were of the form even-number5, rounded to before the 5. Some were comparing a large number of digits. Then there's these: %#.0g 0 - 0. Got '0.0' %#.1g 0 - 0. Got '0.0' %#.2g 0 - 0.0

[issue6198] test_float fails on Windows

2009-06-05 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Checked in to trunk in r73240. -- assignee: marketdickinson - eric.smith resolution: - fixed stage: - committed/rejected status: open - closed type: - behavior ___ Python tracker rep

[issue6198] test_float fails on Windows

2009-06-05 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Mark Dickinson wrote: Out of interest, what does '%#.0f' % 1.5 produce on Python 2.7/Windows? I'd expect to get '2.' both for round-half-to-even and round-half-away-from-zero. Does Windows round this down to '1.' instead? Windows in trunk

[issue6198] test_float fails on Windows

2009-06-05 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: [Mark] Out of interest, what does '%#.0f' % 1.5 produce on Python 2.7/Windows? I'd expect to get '2.' both for round-half-to-even and round-half-away-from-zero. Does Windows round this down to '1.' instead? [Eric] Windows in trunk gives

[issue1943] improved allocation of PyUnicode objects

2009-06-02 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1943 ___ ___ Python-bugs-list mailing

[issue6081] str.format_from_mapping()

2009-05-27 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I think this would be useful. I don't fee terribly strongly about it, but I think I'd like the name str.format_using_mapping(). When I initially saw this, I thought from the name it was creating a format object (whatever that would be) from

[issue6089] str.format raises SystemError

2009-05-23 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Fixed in: trunk: r72848 release26-maint: r72849 py3k: r72850 release30-main: r72851 -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue6089] str.format raises SystemError

2009-05-22 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Any character after a ']' other than '.' or '[' triggers this bug: '{0[0]x}'.format([None]) Assertion failed: (0), function FieldNameIterator_next, file Objects/stringlib/string_format.h, line 379. I'll fix it this weekend. -- assignee

[issue6081] str.format_from_mapping()

2009-05-22 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6081 ___ ___ Python-bugs-list mailing

[issue5829] float('1e500') - inf, complex('1e500') - ValueError

2009-05-17 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: It looks good to me. -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5829

[issue5864] format(1234.5, '.4') gives misleading result

2009-05-16 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I don't see any point in backporting to 3.0 at this point. While it's definitely a problem in 2.6, it seems like a big change to make in a bugfix release. I guess I'm +0 on it. -- ___ Python tracker

[issue5988] Delete PyOS_ascii_formatd, PyOS_ascii_strtod, and PyOS_ascii_atof

2009-05-10 Thread Eric Smith
New submission from Eric Smith e...@trueblade.com: These 3 functions were deprecated in 2.7 and 3.1, and need to be removed in 2.8 and 3.2. This is currently assigned to version 3.2 only because the bug tracker can't assign issues to 2.8. -- assignee: eric.smith components: Interpreter

[issue5963] Doc error: integer precision in formats

2009-05-08 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: integer presentation types is still not exactly correct, because there are presentation types that work across value types. Specifically, 'n' works on integers and floats. Precision is allowed for floats, but not ints: format(10.0, '.4n') '10

[issue5965] Format Specs: doc 's' and implicit conversions

2009-05-08 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I'll look at it. The comma stuff needs to be added for 2.7 and 3.1, too. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5965

[issue5963] Doc error: integer precision in formats

2009-05-07 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: PEP 3101 says it's ignored. I chose to be strict. I don't see the advantage of allowing but ignoring it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5963

[issue5963] Doc error: integer precision in formats

2009-05-07 Thread Eric Smith
Changes by Eric Smith e...@trueblade.com: -- assignee: georg.brandl - eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5963 ___ ___ Python

[issue5963] Doc error: integer precision in formats

2009-05-07 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I updated the docs to say precision is not allowed for integers. -- resolution: - accepted status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5963

[issue5799] Change ntpath functions to implicitly support UNC paths

2009-05-06 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Thanks for looking at this, Mark. If we could only assign issues to Python 3.2 and 3.3 to change the pending deprecation warning to a real one, and to remove the function entirely, we'd be all set! I'm always worried we'll forget these things

[issue3382] Make '%F' and float.__format__('F') convert results to upper case.

2009-05-06 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Checked in to py3k in 72398. I'm reconsidering whether to make this change in 2.7. I might make the change there, I'll have to check on the impacts. -- ___ Python tracker rep...@bugs.python.org http

[issue5799] Change ntpath functions to implicitly support UNC paths

2009-05-05 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: This looks okay to me. (The itertools import isn't needed, but easy enough to fix on checkin.) I'd still like someone else to look it over, but if no one does before the beta, I'll check it in. -- keywords: +needs review stage: - patch

[issue5920] Confusing float formatting for empty presentation type.

2009-05-05 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: I've reviewed this and it looks good. I'll check it in to py3k shortly. Then I'll backport it to 2.7 and fix the user documentation. -- resolution: - accepted stage: patch review - ___ Python tracker

[issue5943] Bus error in test_posix on Mac OS

2009-05-05 Thread Eric Smith
New submission from Eric Smith e...@trueblade.com: I get a bus error in test_lchflags in test_posix.py on my Mac OS X 10.5 box. I'll try and spend some time later today to debug this, but here's the backtrace if anyone wants to look at it: Program received signal EXC_BAD_ACCESS, Could

[issue5943] Bus error in test_posix on Mac OS

2009-05-05 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Fedora Core 6 works okay. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5943 ___ ___ Python

[issue5943] Bus error in test_posix on Mac OS

2009-05-05 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Yes, that patch fixes the problem for me on Mac OS. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5943

[issue5943] Bus error in test_posix on Mac OS

2009-05-05 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: My Fedora Core 6 box still works with the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5943

[issue5920] Confusing float formatting for empty presentation type.

2009-05-05 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Committed in py3k r72333 and trunk r72348. I also updated the documentation. Closing the issue. -- components: +Interpreter Core status: open - closed ___ Python tracker rep...@bugs.python.org http

[issue5799] Change ntpath functions to implicitly support UNC paths

2009-05-05 Thread Eric Smith
Eric Smith e...@trueblade.com added the comment: Looking at Guido's removal of this back in 1999, he says: * Lib/ntpath.py: Withdraw the UNC support from splitdrive(). Instead, a new function splitunc() parses UNC paths. The contributor of the UNC parsing in splitdrive() doesn't like

<    1   2   3   4   5   6   7   8   >