[issue2647] XML munges apos entity in tag content

2008-04-17 Thread Martin v. Löwis
Martin v. Löwis [EMAIL PROTECTED] added the comment: That's not a bug. The two XML documents are completely equivalent. If you rely on the lexical representation of specific characters, you should reconsider your usage of XML. toxml could have chosen to represent as #60;, and that still would

[issue2646] Python does not accept unicode keywords

2008-04-17 Thread Martin v. Löwis
Changes by Martin v. Löwis [EMAIL PROTECTED]: -- versions: +Python 2.6 -Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2646 __ ___ Python-bugs-list mailing

[issue2603] Make range __eq__ work

2008-04-17 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: No need to get hung-up on the hash function. I can fix that up after a checkin and use something simple like: hashvalue = (start*prime1+seqlen) *prime2+step. That doesn't involve object creation and it produces the same hash value for

[issue2603] Make range __eq__ work

2008-04-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: It produces the same hash value for range(5,10,2) and range(5,9,2) which are equivalent. If equivalent means __eq__, they are not. This does not invalidate your formula, of course: different objects may have the same hash. It is also

[issue2603] Make range __eq__ work

2008-04-17 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: That was a typo. The pair was range(5,10,2)--[5, 7, 9] and range (5,11,2)--[5, 7, 9]. The formula works because the it uses seqlen instead of a stop value. __ Tracker [EMAIL PROTECTED]

[issue2648] decimal receipe moneyfmt suppress leading 0

2008-04-17 Thread Carsten Grohmann
New submission from Carsten Grohmann [EMAIL PROTECTED]: The current version of the receipe moneyfmt doesn't have a leading 0 for 1 value -1. The attached patch adds a new parameter zero. The parameter is empty per default and can set to 0 print a leading 0. The examples are updated also.

[issue1222] locale.format bug if thousand separator is space (french separator as example)

2008-04-17 Thread Antoine Pitrou
Antoine Pitrou [EMAIL PROTECTED] added the comment: I see that http://wiki.python.org/moin/PythonBugDay says need to test on non-MacOS platform. Actually, I've tested the patch under Mandriva and Debian Linux. __ Tracker [EMAIL PROTECTED]

[issue2648] decimal receipe moneyfmt suppress leading 0

2008-04-17 Thread Raymond Hettinger
Changes by Raymond Hettinger [EMAIL PROTECTED]: -- assignee: georg.brandl - rhettinger nosy: +rhettinger type: - feature request versions: +Python 2.6 -Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2648

[issue2648] decimal receipe moneyfmt suppress leading 0

2008-04-17 Thread Raymond Hettinger
Raymond Hettinger [EMAIL PROTECTED] added the comment: Thanks for the contribution. Changed to be non-optional and applied as r62364 but not backported. -- resolution: - accepted status: open - closed __ Tracker [EMAIL PROTECTED]

[issue2649] poss. patch for fnmatch.py to add {.htm, html} style globbing

2008-04-17 Thread Mark Summerfield
New submission from Mark Summerfield [EMAIL PROTECTED]: At the moment fnmatch.py (and therefore glob.py) support: * . [chars] [!chars] The attached version of fnmatch.py extends this to: * . [chars] [!chars] {one,two,...} There are 2 changes from the original fnmatch.py file: (1) The

[issue2650] re.escape should not escape underscore

2008-04-17 Thread Russ Cox
New submission from Russ Cox [EMAIL PROTECTED]: import re print re.escape(_) Prints \_ but should be _. This behavior differs from Perl and other systems: _ is an identifier character and as such does not need to be escaped. -- messages: 65585 nosy: rsc severity: normal status: open

[issue2650] re.escape should not escape underscore

2008-04-17 Thread Russ Cox
Changes by Russ Cox [EMAIL PROTECTED]: -- components: +Regular Expressions __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2650 __ ___ Python-bugs-list mailing list

[issue2650] re.escape should not escape underscore

2008-04-17 Thread Guido van Rossum
Changes by Guido van Rossum [EMAIL PROTECTED]: -- keywords: +easy __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2650 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2650] re.escape should not escape underscore

2008-04-17 Thread Guido van Rossum
Changes by Guido van Rossum [EMAIL PROTECTED]: -- versions: +Python 2.6, Python 3.0 -Python 2.5 __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2650 __ ___

[issue2651] Strings passed to KeyError do not round trip

2008-04-17 Thread Rick Harris
New submission from Rick Harris [EMAIL PROTECTED]: Here is a bug in Python 2.5 which would be nice to fix for Py3k (since we are already breaking compatibility): Take a string: s = Hello Create a KeyError exception with that string: e = KeyError(s) Counterintuitively, casting the exception to

[issue2651] Strings passed to KeyError do not round trip

2008-04-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Here is a relevant comment inside the KeyError_str function: /* If args is a tuple of exactly one item, apply repr to args[0]. This is done so that e.g. the exception raised by {}[''] prints KeyError: '' rather

[issue2643] mmap_object_dealloc does not call FlushViewOfFile on windows

2008-04-17 Thread Trent Nelson
Changes by Trent Nelson [EMAIL PROTECTED]: -- nosy: +Trent.Nelson __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2643 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2651] Strings passed to KeyError do not round trip

2008-04-17 Thread Rick Harris
Rick Harris [EMAIL PROTECTED] added the comment: I think it is important to round-trip for at least two reasons: 1) Consistency. Other built-in exceptions behave this way, why should KeyError be any different? Okay, technically 3 UnicodeErrors don't allow just strings to be passed in (perhaps

[issue2610] string representation of range

2008-04-17 Thread Brad Miller
Brad Miller [EMAIL PROTECTED] added the comment: Based on the discussion on python-dev I've worked up a patch and tests for repr of dict_items, dict_keys, and dict_values. I've also modified the patch and test for str of the range object. (If there was a way to get the str(range(10)) to

[issue2610] string representation of range and dictionary views

2008-04-17 Thread Benjamin Peterson
Changes by Benjamin Peterson [EMAIL PROTECTED]: -- title: string representation of range - string representation of range and dictionary views __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2610 __

[issue2650] re.escape should not escape underscore

2008-04-17 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: It seems that escape is pretty dumb. The documentations says that re.escape escapes all non-alphanumeric characters, and it does that faithfully. It would seem more useful to have a list of meta-characters and just escape those. This is more

[issue2610] string representation of range and dictionary views

2008-04-17 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Some review of dv_range.patch: - repr(d.keys()) depends on the internal ordering of items, their hash values, the insertion order... the test seems fragile. Or you may rely on the fact that ints are their own hash values, so a small dict

[issue2610] string representation of range and dictionary views

2008-04-17 Thread Brad Miller
Brad Miller [EMAIL PROTECTED] added the comment: On Apr 17, 2008, at 4:26 PM, Amaury Forgeot d'Arc wrote: Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment: Some review of dv_range.patch: - repr(d.keys()) depends on the internal ordering of items, their hash values, the insertion

[issue2603] Make range __eq__ work

2008-04-17 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Attaching a new patch with a few improvements. I tried to implemented Raymond's hash function (I think this is how the math should be done.). The rich compare function now short-circuits when a value isn't equal. Also, I made ranges with the

[issue2636] Regexp 2.6 (modifications to current re 2.2.2)

2008-04-17 Thread Jeffrey C. Jacobs
Jeffrey C. Jacobs [EMAIL PROTECTED] added the comment: I am very sorry to report (at least for me) that as of this moment, item 9), although not yet complete, is stable and able to pass all the existing python regexp tests. Because these tests are timed, I am using the timings from the first

[issue1184112] Missing trailing newline with comment raises SyntaxError

2008-04-17 Thread Inyeol Lee
Inyeol Lee [EMAIL PROTECTED] added the comment: Missing trailing newline still triggers error as of 2.5.1: import parser parser.suite(pass\n ) IndentationError: unexpected indent parser.suite(if True:\n pass\n ) SyntaxError: invalid syntax -- nosy: +inyeollee

[issue2652] 64 bit python memory leak usage

2008-04-17 Thread kevin
New submission from kevin [EMAIL PROTECTED]: For the code below.. memory usage keeps increasing continuously.. This does not happen in a 32-bit machine python build. i think it might be the datetime module where the problem might be.. linux kernel version (both on 32-bit and 64 bit machine)

[issue2621] rename test_support to support

2008-04-17 Thread Benjamin Peterson
Benjamin Peterson [EMAIL PROTECTED] added the comment: Brett, comments? __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2621 __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2652] 64 bit python memory leak usage

2008-04-17 Thread Gregory P. Smith
Changes by Gregory P. Smith [EMAIL PROTECTED]: -- nosy: +gregory.p.smith __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2652 __ ___ Python-bugs-list mailing list

[issue2621] rename test_support to support

2008-04-17 Thread Brett Cannon
Brett Cannon [EMAIL PROTECTED] added the comment: I am going to assign this to me, but wait until Guido pronounces on PEP 3108 before moving forward with a review. -- assignee: - brett.cannon __ Tracker [EMAIL PROTECTED]

[issue2650] re.escape should not escape underscore

2008-04-17 Thread Russ Cox
Russ Cox [EMAIL PROTECTED] added the comment: It seems that escape is pretty dumb. The documentations says that re.escape escapes all non-alphanumeric characters, and it does that faithfully. It would seem more useful to have a list of meta-characters and just escape those. This is more true