Re: [Python-Dev] Should there be a source-code checksum in module objects?

2009-02-03 Thread rocky
Guido van Rossum writes: I suggest that you move this discussion to python-ideas to ferret out a possible implementation and API; or to find out work-arounds. Okay. Done. ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] C API for appending to arrays

2009-02-03 Thread Hrvoje Niksic
Raymond Hettinger wrote: [Hrvoje Niksic] The one thing missing from the array module is the ability to directly access array values from C. Please put a feature request on the bug tracker. Done, http://bugs.python.org/issue5141 ___ Python-Dev

[Python-Dev] Partial function application 'from the right'

2009-02-03 Thread Ben North
Hi, Thanks for the further responses. Again, I'll try to summarise: Scott David Daniels pointed out an awkward interaction when chaining partial applications, such that it could become very unclear what was going to happen when the final function is called: If you have: def button(root,

Re: [Python-Dev] [patch] Duplicate sections detection in ConfigParser

2009-02-03 Thread Aahz
On Tue, Feb 03, 2009, Yannick Gingras wrote: The attached patch is compatible with both the 2.x and the 3.x branches; it adds a `unique_sects` parameter to the constructor of RawConfigParser and a test in the parser loop that raises DuplicateSectionError if a section is seen more then once

Re: [Python-Dev] [patch] Duplicate sections detection in ConfigParser

2009-02-03 Thread Raghuram Devarakonda
The attached patch is compatible with both the 2.x and the 3.x branches; it adds a `unique_sects` parameter to the constructor of RawConfigParser and a test in the parser loop that raises DuplicateSectionError if a section is seen more then once and that unique_sects is True.

Re: [Python-Dev] Partial function application 'from the right'

2009-02-03 Thread Collin Winter
On Tue, Feb 3, 2009 at 5:44 AM, Ben North b...@redfrontdoor.org wrote: Hi, Thanks for the further responses. Again, I'll try to summarise: Scott David Daniels pointed out an awkward interaction when chaining partial applications, such that it could become very unclear what was going to

Re: [Python-Dev] Partial function application 'from the right'

2009-02-03 Thread Calvin Spealman
http://bugs.python.org/issue1706256 Took me a couple days to catch up on this thread so here is the link for any interested. Could it be possible to reevaluate this? On Sat, Jan 31, 2009 at 2:40 PM, Leif Walsh leif.wa...@gmail.com wrote: On Fri, Jan 30, 2009 at 7:38 PM, Calvin Spealman

Re: [Python-Dev] teaching the new urllib

2009-02-03 Thread Benjamin Peterson
On Tue, Feb 3, 2009 at 2:08 PM, Brad Miller millb...@luther.edu wrote: Here's the iteration problem: 'b\'!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN\\n\'' for line in page: print(line) Traceback (most recent call last): File pyshell#10, line 1, in module for line in

Re: [Python-Dev] teaching the new urllib

2009-02-03 Thread Bill Janssen
İsmail Dönmez ism...@namtrac.org wrote: Hi, On Tue, Feb 3, 2009 at 21:56, Brett Cannon br...@python.org wrote: Probably the biggest issue will be having to explain string encoding. Obviously you can gloss over it or provide students with a simple library that just automatically converts

Re: [Python-Dev] Partial function application 'from the right'

2009-02-03 Thread Collin Winter
On Tue, Feb 3, 2009 at 11:53 AM, Antoine Pitrou solip...@pitrou.net wrote: Collin Winter collinw at gmail.com writes: Have any of the original objections to Calvin's patch (http://bugs.python.org/issue1706256) been addressed? If not, I don't see anything in these threads that justify

Re: [Python-Dev] Partial function application 'from the right'

2009-02-03 Thread Raymond Hettinger
I still haven't seen any real code presented that would benefit from partial.skip or partial_right. # some Articles have timestamp attributes and some don't stamp = partial_right(getattr, 'timestamp', 0) lastupdate = max(map(stamp, articles)) # some beautiful soup nodes have a name attribute

Re: [Python-Dev] Issue 4285 Review

2009-02-03 Thread Aahz
On Tue, Feb 03, 2009, Ross Light wrote: Hello, python-dev. I submitted a patch a couple weeks ago for Issue 4285, and it has been reviewed and revised. Would someone please review/commit it? Thank you. http://bugs.python.org/issue4285 When sending in a request like this, it's useful to

Re: [Python-Dev] teaching the new urllib

2009-02-03 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brett Cannon wrote: On Tue, Feb 3, 2009 at 11:08, Brad Miller millb...@luther.edu wrote: I'm just getting ready to start the semester using my new book (Python Programming in Context) and noticed that I somehow missed all the changes to urllib in

Re: [Python-Dev] teaching the new urllib

2009-02-03 Thread Daniel (ajax) Diniz
Tres Seaver wrote: Brett Cannon wrote: No because you are getting back the repr for the bytes object. Str does not know what the encoding is for the bytes so it has no way of performing the decoding. The encoding information *is* available in the response headers, e.g.: [snip] That's the

[Python-Dev] teaching the new urllib

2009-02-03 Thread Brad Miller
I'm just getting ready to start the semester using my new book (Python Programming in Context) and noticed that I somehow missed all the changes to urllib in python 3.0. ARGH to say the least. I like using urllib in the intro class because we can get data from places that are more

Re: [Python-Dev] C API for appending to arrays

2009-02-03 Thread Mike Klaas
On 2-Feb-09, at 9:21 AM, Hrvoje Niksic wrote: It turns out that an even faster method of creating an array is by using the fromstring() method. fromstring() requires an actual string, not a buffer, so in C++ I created an std::vectordouble with a contiguous array of doubles, passed that

[Python-Dev] teaching the new urllib

2009-02-03 Thread Brad Miller
I'm just getting ready to start the semester using my new book (Python Programming in Context) and noticed that I somehow missed all the changes to urllib in python 3.0. ARGH to say the least. I like using urllib in the intro class because we can get data from places that are more

Re: [Python-Dev] Partial function application 'from the right'

2009-02-03 Thread Antoine Pitrou
Collin Winter collinw at gmail.com writes: Have any of the original objections to Calvin's patch (http://bugs.python.org/issue1706256) been addressed? If not, I don't see anything in these threads that justify resurrecting it. I still haven't seen any real code presented that would benefit

Re: [Python-Dev] teaching the new urllib

2009-02-03 Thread Brett Cannon
On Tue, Feb 3, 2009 at 15:50, Tres Seaver tsea...@palladion.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brett Cannon wrote: On Tue, Feb 3, 2009 at 11:08, Brad Miller millb...@luther.edu wrote: I'm just getting ready to start the semester using my new book (Python Programming in

Re: [Python-Dev] Issue 4285 Review

2009-02-03 Thread Eric Smith
Aahz wrote: On Tue, Feb 03, 2009, Ross Light wrote: Hello, python-dev. I submitted a patch a couple weeks ago for Issue 4285, and it has been reviewed and revised. Would someone please review/commit it? Thank you. http://bugs.python.org/issue4285 When sending in a request like this, it's

[Python-Dev] Issue 4285 Review

2009-02-03 Thread Ross Light
Hello, python-dev. I submitted a patch a couple weeks ago for Issue 4285, and it has been reviewed and revised. Would someone please review/commit it? Thank you. http://bugs.python.org/issue4285 Cheers, Ross Light ___ Python-Dev mailing list

Re: [Python-Dev] Issue 4285 Review

2009-02-03 Thread Ross Light
On Tue, Feb 3, 2009 at 1:20 PM, Aahz a...@pythoncraft.com wrote: When sending in a request like this, it's useful to summarize the issue; few people know bug reports by number, and at least some people who might be interested in looking probably won't bother if they have no clue whether it's

Re: [Python-Dev] teaching the new urllib

2009-02-03 Thread Bill Janssen
Brett Cannon br...@python.org wrote: On Tue, Feb 3, 2009 at 15:50, Tres Seaver tsea...@palladion.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Brett Cannon wrote: On Tue, Feb 3, 2009 at 11:08, Brad Miller millb...@luther.edu wrote: I'm just getting ready to start the