Re: [Python-Dev] Encoding detection in the standard library?

2008-05-11 Thread Greg Wilson
Bill Janssen: Since the site that receives the POST doesn't necessarily have access to the Web page that originally contained the form, that's not really helpful. However, POSTs can use the MIME type "multipart/form-data" for non-Latin-1 content, and should. That contains facilities for indi

Re: [Python-Dev] syntactic support for sets

2006-02-03 Thread Greg Wilson
> > > Raymond: > > > Accordingly,Guido rejected the braced notation for set comprehensions. > > > See: http://www.python.org/peps/pep-0218.html > > Greg: > > "...however, the issue could be revisited for Python 3000 (see PEP 3000)." > > So I'm only 1994 years early ;-) > Alex: > Don't be such a

Re: [Python-Dev] syntactic support for sets

2006-02-02 Thread Greg Wilson
> Like many things in Python where people pre-emptively believe one thing > or another, the interpreter's corrective feedback is immediate: Yup, that's the theory; it's a shame practice is different. > Once the students have progressed beyond academic finger drills and have > started writing real

Re: [Python-Dev] syntactic support for sets

2006-02-02 Thread Greg Wilson
> The PEP records that Tim argued for leaving the extra parentheses. What > would you do with {'title'} -- create a four element set consisting of > letters or a single element set consisting of a string? This is a moderately-fertile source of bugs for newcomers: judging from the number of student

Re: [Python-Dev] syntactic support for sets

2006-02-02 Thread Greg Wilson
> Generator expressions make syntactic support irrelevant: Not when you're teaching the language to undergraduates: I haven't actually done the study yet (though I may this summer), but I'm willing to bet that allowing "math" notation for sets will more than double their use. (Imagine having to w

[Python-Dev] syntactic support for sets

2006-02-01 Thread Greg Wilson
Hi, I have a student who may be interested in adding syntactic support for sets to Python, so that: x = {1, 2, 3, 4, 5} and: y = {z for z in x if (z % 2)} would be legal. There are of course issues (what's the syntax for a frozen set? for the empty set?), but before he even starts, I'

Re: [Python-Dev] [Argon] Re: 51 Million calls to _PyUnicodeUCS2_IsLinebreak() (???)

2005-08-25 Thread Greg Wilson
> > Walter Dörwald wrote: > >>At least it would remove the quadratic number of calls to > >>_PyUnicodeUCS2_IsLinebreak(). For each character it would be called only > >>once. > Martin v. Löwis wrote: > > Correct. However, I very much doubt that this is the cause of the > > slowdown. > Walter Dörw

Re: [Python-Dev] [Argon] Re: 51 Million calls to _PyUnicodeUCS2_IsLinebreak() (???)

2005-08-25 Thread Greg Wilson
Hi Martin (and everyone else); thanks for your mail. The N*N/2 invocations would explain why we saw such a large number of invocations --- thanks for figuring it out. W.r.t. how we're invoking our script: > > But if you're using CGI, you're importing your source on every > > invocation. > > Well

[Python-Dev] PSF grant / contacts

2005-08-09 Thread Greg Wilson
endly people in sci&eng to look it over and give me feedback. If you know people who fit this bill (particularly people who might be interested in following along with a trial run of the course this fall), I'd be grateful for pointers. Thank

[Python-Dev] decorators article for DDJ?

2004-12-10 Thread Greg Wilson
Hi folks. Is anyone interested in doing an article on Python decorators for "Doctor Dobb's Journal"? If so, please drop me a line... Thanks, Greg ___ Python-Dev mailing list [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/python-dev Unsubscri