Re: [Python-Dev] Lexical scoping in Python 3k

2006-07-03 Thread Talin
Josiah Carlson wrote: > I had hoped that there would be a response to my second (and I believe > more applicable statement); "if the feature is really only useful for > generally trivial cases *without* the feature, then making them even > more trivial, I think, is a bit of over optimization." It

Re: [Python-Dev] Proposal to eliminate PySet_Fini

2006-07-03 Thread Tim Peters
[Jack Diederich] >> PyObject_MALLOC does a good job of reusing small allocations but it >> can't quite manage the same speed as a free list, especially for things that >> have some extra setup involved (tuples have a free list for each length). [Martin v. Löwis] > I would question that statement,

Re: [Python-Dev] Lexical scoping in Python 3k

2006-07-03 Thread Greg Ewing
Josiah Carlson wrote: > I had hoped that there would be a response to my second (and I believe > more applicable statement); "if the feature is really only useful for > generally trivial cases *without* the feature, then making them even > more trivial, I think, is a bit of over optimization." I

Re: [Python-Dev] Lexical scoping in Python 3k

2006-07-03 Thread Greg Ewing
Talin wrote: > To put it another way - I am an advocate of applying Claude Shannon's > theory of information to language design. The highest level of > compression should be used for expressions that occur the most frequently. I believe the proposal in question would cause no net worsening in t

Re: [Python-Dev] Lexical scoping in Python 3k

2006-07-03 Thread skip
Josiah> As for a solution, I find the "global means 'not local'" Josiah> proposition is the least undesireable of the possibilities. It Josiah> suffers from a change in semantics and potential name masking Josiah> issues... Pychecker and PyLint both already identify cases where bu

Re: [Python-Dev] Lexical scoping in Python 3k

2006-07-03 Thread Andrew Koenig
> I don't think "trivial" is the right word to use here, > since it implies something that's of so little importance > that it can be ignored. But the simple cases are precisely > the ones where this wart hurts the most, so we can't > ignore them. I'd like to inject an example that might help make

Re: [Python-Dev] Proposal to eliminate PySet_Fini

2006-07-03 Thread Martin v. Löwis
Tim Peters wrote: > With current trunk that printed > > [2.9363677646013846, 2.9489729031005703, 2.9689538729183949] > > After changing > > #define MAXSAVEDTUPLES 2000 > > to > > #define MAXSAVEDTUPLES 0 > > the times zoomed to > > [4.5894824930441587, 4.6023111649343242, 4.629560027293957

Re: [Python-Dev] Lexical scoping in Python 3k

2006-07-03 Thread Guido van Rossum
On 7/3/06, Andrew Koenig <[EMAIL PROTECTED]> wrote: > > I don't think "trivial" is the right word to use here, > > since it implies something that's of so little importance > > that it can be ignored. But the simple cases are precisely > > the ones where this wart hurts the most, so we can't > > ig

Re: [Python-Dev] Lexical scoping in Python 3k

2006-07-03 Thread Andrew Koenig
> Much though the Algol 60 tickles my nostalgia (it was my first > programming language!) I don't think that it's a particularly strong > argument. I like to think that we have better ways these days. Even if so, that's not the point I was trying to make. The point is that there is a programming

Re: [Python-Dev] Moving the ctypes repository to python.org

2006-07-03 Thread Thomas Heller
Martin v. Löwis schrieb: > Thomas Heller wrote: >> - Do I need special rights to call 'svnadmin load' to import this dumpfile >> into Python SVN, or are the normal commit rights sufficient? > > It's called "svnadmin" for a reason :-) > > Neal Norwitz or myself will have to do that; we need to d

Re: [Python-Dev] Moving the ctypes repository to python.org

2006-07-03 Thread Thomas Heller
Martin v. Löwis schrieb: > Thomas Heller wrote: >> - Do I need special rights to call 'svnadmin load' to import this dumpfile >> into Python SVN, or are the normal commit rights sufficient? > > It's called "svnadmin" for a reason :-) > > Neal Norwitz or myself will have to do that; we need to d

Re: [Python-Dev] weakattr

2006-07-03 Thread tomer filiba
> I like the added functionality offered with weakattrs as defined. I'm > not terribly in love with the syntax of their creation, and I'm curious > as to how it plays with __slots__ weakattrs are data descriptors, just like properties etc. they are part of the class, not the instance, so there sho

[Python-Dev] Time-out in URL Open

2006-07-03 Thread Facundo Batista
I need a timeout in urlopen, just to be able to make: >>> urllib2.urlopen("http://no.host.org";, timeout=2) This is actually not possible, but I'll make it work. I want to know, please, if this is useful in general, for me to post a patch in SF. Regards, -- .Facundo Blog: http://www.tani

Re: [Python-Dev] Time-out in URL Open

2006-07-03 Thread Fred L. Drake, Jr.
On Monday 03 July 2006 14:07, Facundo Batista wrote: > I want to know, please, if this is useful in general, for me to post a > patch in SF. It seems like something that should be easy, and lots of people need to consider this for applications. -Fred -- Fred L. Drake, Jr. _

Re: [Python-Dev] Time-out in URL Open

2006-07-03 Thread Martin v. Löwis
Facundo Batista wrote: urllib2.urlopen("http://no.host.org";, timeout=2) > > This is actually not possible, but I'll make it work. > > I want to know, please, if this is useful in general, for me to post a > patch in SF. While it might be useful, it can only be added to Python 2.6 now. So t

Re: [Python-Dev] Lexical scoping in Python 3k

2006-07-03 Thread Guido van Rossum
On 7/3/06, Andrew Koenig <[EMAIL PROTECTED]> wrote: > > Much though the Algol 60 tickles my nostalgia (it was my first > > programming language!) I don't think that it's a particularly strong > > argument. I like to think that we have better ways these days. > > Even if so, that's not the point I w

Re: [Python-Dev] Time-out in URL Open

2006-07-03 Thread Guido van Rossum
To fake things like this, socket.setdefaulttimeout() was added, though I don't know if it actually works. Have you tried that? --Guido On 7/3/06, Facundo Batista <[EMAIL PROTECTED]> wrote: > I need a timeout in urlopen, just to be able to make: > > >>> urllib2.urlopen("http://no.host.org";, timeo

Re: [Python-Dev] Time-out in URL Open

2006-07-03 Thread skip
Facundo> I need a timeout in urlopen, just to be able to make: urllib2.urlopen("http://no.host.org";, timeout=2) Facundo> This is actually not possible, but I'll make it work. Facundo> I want to know, please, if this is useful in general, for me to Facundo> post a patch

Re: [Python-Dev] Time-out in URL Open

2006-07-03 Thread skip
Guido> To fake things like this, socket.setdefaulttimeout() was added, Guido> though I don't know if it actually works. Have you tried that? I'm pretty sure it does, but is a rather blunt instrument for the task, as it affects all socket connections the app might make. Skip _

Re: [Python-Dev] Time-out in URL Open

2006-07-03 Thread John J Lee
On Mon, 3 Jul 2006, Guido van Rossum wrote: > To fake things like this, socket.setdefaulttimeout() was added, though > I don't know if it actually works. Have you tried that? [...] It works. I think there's some issue with SSL, though (can't seem to find the issue now). Of course, feeding thro

Re: [Python-Dev] 2.5 and beyond

2006-07-03 Thread Bill Chiles
For Common Lispers and probably Schemers, Python has some surprising semantics around scope and lifetime extent of variables. Three that leap out at me are: * function parameters with default values are NOT new bindings for each invocation, so a default value of [] changes if you destructively

Re: [Python-Dev] 2.5 and beyond

2006-07-03 Thread Josiah Carlson
"Bill Chiles" <[EMAIL PROTECTED]> wrote: > > For Common Lispers and probably Schemers, Python has some surprising > semantics around scope and lifetime extent of variables. Three that > leap out at me are: One thing to remember is that Python is not Scheme/Lisp. It borrows some ideas from Sche

Re: [Python-Dev] 2.5 and beyond

2006-07-03 Thread Guido van Rossum
On 7/4/06, Josiah Carlson <[EMAIL PROTECTED]> wrote: > One thing to remember is that Python is not Scheme/Lisp. It borrows > some ideas from Scheme/Lisp, I can say it stronger. Any resemblance between Python and Scheme or Lisp is purely a coincidence. Neither language is in Python's ancestry, at