Re: [Python-Dev] Explicit Lexical Scoping (pre-PEP?)

2006-07-11 Thread Talin
Ka-Ping Yee wrote: On Mon, 10 Jul 2006 [EMAIL PROTECTED] wrote: I think Talin's got a point though. It seems hard to find one short English word that captures the essence of the desired behavior. None of the words in his list seem strongly suggestive of the meaning to me. I suspect that

Re: [Python-Dev] In defense of Capabilities [was: doc for new restricted execution design for Python]

2006-07-11 Thread Talin
Brett Cannon wrote: Using a factory method callback, one could store the PyCodeObject in a C proxy object that just acts as a complete delegate, forwarding all method calls to the internally stored PyCodeObject. That would work. For this initial implementation, though, I am not going to

Re: [Python-Dev] Klocwork analysis of source if we want it

2006-07-11 Thread Martin v. Löwis
Brett Cannon wrote: http://www.klocwork.com/company/releases/06_26_06.asp Looks like Klocowork is doing the same thing as Coverity and providing free static analysis of source for open source projects. Doubt we want this *and* Coverity, but figured wouldn't hurt to let people know about it.

Re: [Python-Dev] Explicit Lexical Scoping (pre-PEP?)

2006-07-11 Thread Fredrik Lundh
Jeremy Hylton wrote: To express this email in the positive form: 1. Reserved words should be real words. 2. The meaning of the word should be clear. 3. Put statements in positive form. (Strunk White) 4. The word should sound good. agreed. a word should describe what a thing is, not what

Re: [Python-Dev] Explicit Lexical Scoping (pre-PEP?)

2006-07-11 Thread Fredrik Lundh
Talin wrote: I also think that it won't be a complete disaster if we do nothing at all - there *are* existing ways to deal with this problem; there are even some which aren't hackish and non-obvious. For example, its easy enough to create an object which acts as an artificial scope:

[Python-Dev] easy_install

2006-07-11 Thread Talin
Here's something to discuss: First, let me say that I love easy_install. I absolutely just works and does what I want, and makes it really simple to install whatever bit of Python code I need. At the same time, however, I get kind of scared when I hear people on the list discussing the

[Python-Dev] subprocess.CalledProcessError.errno (#1223937)

2006-07-11 Thread Peter Åstrand
I intend to fix bug #1223937: subprocess.py abuse of errno. I thought this was going to to tricky, to maintain backwards compatibility, but then I realized that check_call() and CalledProcessError() are not available in any released version of Python, so I guess it's safe to change them.

Re: [Python-Dev] subprocess.CalledProcessError.errno (#1223937)

2006-07-11 Thread Fredrik Lundh
Peter Åstrand wrote: I intend to fix bug #1223937: subprocess.py abuse of errno. I thought this was going to to tricky, to maintain backwards compatibility, but then I realized that check_call() and CalledProcessError() are not available in any released version of Python, so I guess it's

Re: [Python-Dev] Explicit Lexical Scoping (pre-PEP?)

2006-07-11 Thread Fuzzyman
Talin wrote: Ka-Ping Yee wrote: On Mon, 10 Jul 2006 [EMAIL PROTECTED] wrote: I think Talin's got a point though. It seems hard to find one short English word that captures the essence of the desired behavior. None of the words in his list seem strongly suggestive of the meaning to

Re: [Python-Dev] User's complaints

2006-07-11 Thread Michael Hudson
A.M. Kuchling [EMAIL PROTECTED] writes: On Mon, Jul 10, 2006 at 05:13:53PM +0200, Armin Rigo wrote: didn't draw much applause. It certainly gave me the impression that many changes in Python are advocated and welcomed by only a small fraction of users. The benefits of changes are usually

Re: [Python-Dev] Explicit Lexical Scoping (pre-PEP?)

2006-07-11 Thread Nick Coghlan
Fuzzyman wrote: I've often found it a nuisance that you can't instantiate an 'object', to use as a mutable 'namespace', but instead have to define an arbitrary empty class. What happened to the 'namespace' proposal ? The code and the pre-PEP [1] are still out there, but Carlos, Steve and I

Re: [Python-Dev] Doctest and Footnotes

2006-07-11 Thread Benji York
Phillip J. Eby wrote: It would be nice if tracebacks in the footnote show the invoking context Yep. Someone (Jim Fulton I think) had suggested that to me. I'll look into it. My other thought would be that having a patch that works against the 2.5 version of doctest would be good My

Re: [Python-Dev] [slighly OT] Native speakers and hurting brains

2006-07-11 Thread Fredrik Lundh
Boris Borcic wrote: I believe that in this case native linguistic intuition made the decision... The reason has nothing to do with language. Guido didn't want sum() to become an attractive nuisance by *appearing* to be an obvious way of joining a list of strings, while actually being a very

Re: [Python-Dev] [slighly OT] Native speakers and hurting brains

2006-07-11 Thread Gareth McCaughan
(Attention conservation notice: the following is concerned almost entirely with exegesis of an old python-dev thread. Those interested in improving Python and not in history and exegesis should probably ignore it.) On Tuesday 2006-07-11 13:43, Boris Borcic wrote: I believe that in this case

Re: [Python-Dev] [slighly OT] Native speakers and hurting brains

2006-07-11 Thread Boris Borcic
Gareth McCaughan wrote: (Attention conservation notice: the following is concerned almost entirely with exegesis of an old python-dev thread. Those interested in improving Python and not in history and exegesis should probably ignore it.) On Tuesday 2006-07-11 13:43, Boris Borcic wrote:

Re: [Python-Dev] [slighly OT] Native speakers and hurting brains

2006-07-11 Thread Boris Borcic
I wish to apologize for mistakenly pushing the send button on an untouched copy of Gereth McGaughan's reply, in the case my early cancel at gmane did not stop the propagation. I'll profit just to add (bringing this to a conclusion) Gareth McCaughan wrote: (...was not Guido's first

[Python-Dev] urllib.quote and unicode bug resuscitation attempt

2006-07-11 Thread Stefan Rank
Hi, urllib.quote fails on unicode strings and in an unhelpful way:: Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32 Type help, copyright, credits or license for more information. import urllib urllib.quote('a\xf1a') 'a%F1a'

Re: [Python-Dev] [slighly OT] Native speakers and hurting brains

2006-07-11 Thread Boris Borcic
Fredrik Lundh wrote: in what language the word sum an appropriate synonym for concatenate ? any that admits a+b to mean ''.join([a,b]), I'd say. - BB ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] [slighly OT] Native speakers and hurting brains

2006-07-11 Thread Fredrik Lundh
Boris Borcic wrote: in what language [is] the word sum an appropriate synonym for concatenate ? any that admits a+b to mean ''.join([a,b]), I'd say. and what human language would that be ? /F ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] urllib.quote and unicode bug resuscitation attempt

2006-07-11 Thread skip
Stefan According to a message I found on quixote-users, Stefan http://mail.mems-exchange.org/durusmail/quixote-users/5363/ it Stefan might have worked prior to 2.4.2. Confirmed with 2.3.5. Stefanif isinstance(s, unicode): Stefans = s.encode('utf-8') Stefan

Re: [Python-Dev] Explicit Lexical Scoping (pre-PEP?)

2006-07-11 Thread Robin Bryce
outbound x = 1 x = 2 evaluating using Jeremy Hilton's' list: 1. is a real word 2. For me - in python - it would mean: Is found in 'outer' scope and is already bound. And the literal meaning of 'outbound 'headed away' [1] is pretty darn close to what I mean when I spell the usual mutables

Re: [Python-Dev] Explicit Lexical Scoping (pre-PEP?)

2006-07-11 Thread Fuzzyman
Robin Bryce wrote: outbound x = 1 FWINW, to me 'nonlocal' clearly and immediately tells you what you need to know about the variable. 'outbound' has no programming associations for me (it makes me think of 'outward bound' and roaming the great outdoors). So negative or not I'm +1 on nonlocal

Re: [Python-Dev] Capabilities / Restricted Execution

2006-07-11 Thread Phillip J. Eby
At 03:36 AM 7/11/2006 -0700, Talin wrote: I thought a little bit more about Guido's comment that you can hide Python objects in a C wrapper class. However, as I was trying to sleep, I realized that you don't even need C to do it. The trick is to store the object reference as a closure variable.

[Python-Dev] Subject: RELEASED Python 2.5 (beta 2)

2006-07-11 Thread Anthony Baxter
On behalf of the Python development team and the Python community, I'm happy to announce the second BETA release of Python 2.5. This is an *beta* release of Python 2.5. As such, it is not suitable for a production environment. It is being released to solicit feedback and hopefully discover bugs,

Re: [Python-Dev] [slighly OT] Native speakers and hurting brains

2006-07-11 Thread Boris Borcic
Fredrik Lundh wrote: Boris Borcic wrote: in what language [is] the word sum an appropriate synonym for concatenate ? any that admits a+b to mean ''.join([a,b]), I'd say. and what human language would that be ? Let's admit the answer is 'none' (and I apologize for accusing only

Re: [Python-Dev] [slighly OT] Native speakers and hurting brains

2006-07-11 Thread Guido van Rossum
Please end this thread. Now. Really. -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe:

[Python-Dev] TRUNK is UNFROZEN.

2006-07-11 Thread Anthony Baxter
beta2 is done, so trunk is unfrozen. Remember, we're still in feature freeze, so new features need approval before being committed. Thanks! Anthony -- Anthony Baxter [EMAIL PROTECTED] It's never too late to have a happy childhood. ___ Python-Dev

[Python-Dev] Minor: Unix icons for 2.5?

2006-07-11 Thread Anthony Baxter
There's an open PEP-356 issue for update the icons to the newer shinier ones for Unix. As far as I can see, there's the 14x15 GIF images used for Idle and the documentation. Note that for me at least, idle comes up without an icon _anyway_. Are there any others I missed? Anthony -- Anthony

Re: [Python-Dev] Minor: Unix icons for 2.5?

2006-07-11 Thread Georg Brandl
Anthony Baxter wrote: There's an open PEP-356 issue for update the icons to the newer shinier ones for Unix. As far as I can see, there's the 14x15 GIF images used for Idle and the documentation. Note that for me at least, idle comes up without an icon _anyway_. Are there any others I

Re: [Python-Dev] Capabilities / Restricted Execution

2006-07-11 Thread Scott Dial
Phillip J. Eby wrote: A function's func_closure contains cell objects that hold the variables. These are readable if you can set the func_closure of some function of your own. If the overall plan includes the ability to restrict func_closure setting (or reading) in a restricted

[Python-Dev] get for lists and tuples?

2006-07-11 Thread Russell E. Owen
I'd like to have the get method available for lists and tuples. (I figured this must have been discussed before but can't recall it and didn't turn anything up on google). It's obviously not a use-all-the-time method (or it'd already be there), but I find myself wanting it often enough to

Re: [Python-Dev] Minor: Unix icons for 2.5?

2006-07-11 Thread Fred L. Drake, Jr.
Anthony Baxter wrote: There's an open PEP-356 issue for update the icons to the newer shinier ones for Unix. As far as I can see, there's the 14x15 GIF images used for Idle and the documentation. Note that for me at least, idle comes up without an icon _anyway_. A pyfav.(gif|png)

Re: [Python-Dev] Doctest and Footnotes

2006-07-11 Thread Alexander Belopolsky
Benji York benji at zope.com writes: Here's the idea: when a footnote is referenced in prose, execute the code associated with the footnote at that point. For example: Another natural place for the referenced code is the __test__ dictionary. Using that has an advantage of not clobbering

Re: [Python-Dev] get for lists and tuples?

2006-07-11 Thread Georg Brandl
Russell E. Owen wrote: I'd like to have the get method available for lists and tuples. (I figured this must have been discussed before but can't recall it and didn't turn anything up on google). It's obviously not a use-all-the-time method (or it'd already be there), but I find myself

Re: [Python-Dev] Minor: Unix icons for 2.5?

2006-07-11 Thread Georg Brandl
Fred L. Drake, Jr. wrote: Anthony Baxter wrote: There's an open PEP-356 issue for update the icons to the newer shinier ones for Unix. As far as I can see, there's the 14x15 GIF images used for Idle and the documentation. Note that for me at least, idle comes up without an icon

Re: [Python-Dev] get for lists and tuples?

2006-07-11 Thread Anthony Baxter
On Wednesday 12 July 2006 03:39, Georg Brandl wrote: Anyway, I'm just testing the waters. If it's not heresy then I'd like to do what I can to make it happen. IMO there's almost no chance this can go into 2.5. almost? I'll go you one better. No way at all will it be in 2.5. And I'd be a

Re: [Python-Dev] Doctest and Footnotes

2006-07-11 Thread Benji York
Alexander Belopolsky wrote: Benji York benji at zope.com writes: Here's the idea: when a footnote is referenced in prose, execute the code associated with the footnote at that point. For example: Another natural place for the referenced code is the __test__ dictionary. Using that has an

Re: [Python-Dev] In defense of Capabilities [was: doc for new restricted execution design for Python]

2006-07-11 Thread Brett Cannon
On 7/10/06, Talin [EMAIL PROTECTED] wrote: Brett Cannon wrote: Using a factory method callback, one could store the PyCodeObject in a C proxy object that just acts as a complete delegate, forwarding all method calls to the internally stored PyCodeObject.That would work. For this initial

Re: [Python-Dev] Capabilities / Restricted Execution

2006-07-11 Thread Phillip J. Eby
At 01:30 PM 7/11/2006 -0400, Scott Dial wrote: Phillip J. Eby wrote: A function's func_closure contains cell objects that hold the variables. These are readable if you can set the func_closure of some function of your own. If the overall plan includes the ability to restrict

Re: [Python-Dev] Capabilities / Restricted Execution

2006-07-11 Thread Talin
Scott Dial wrote: Phillip J. Eby wrote: A function's func_closure contains cell objects that hold the variables. These are readable if you can set the func_closure of some function of your own. If the overall plan includes the ability to restrict func_closure setting (or reading) in a

Re: [Python-Dev] Doctest and Footnotes

2006-07-11 Thread Alexander Belopolsky
On 7/11/06, Benji York [EMAIL PROTECTED] wrote: [snip] I'm not quite sure what you're suggesting. A guess: put the code that isn't to be seen in the __test__ dict with a string key being the name of the footnote? That's right. I don't think a ReST processor would like that much. It would

Re: [Python-Dev] Doctest and Footnotes

2006-07-11 Thread Fred Drake
On Tuesday 11 July 2006 14:12, Alexander Belopolsky wrote: Also __new__ and __init__ method docstrings is the natural place to put set-up code. Maybe, if all the tests required the same setup code. That's often not the case. -Fred -- Fred L. Drake, Jr. fred at zope.com Zope

Re: [Python-Dev] get for lists and tuples?

2006-07-11 Thread Georg Brandl
Anthony Baxter wrote: On Wednesday 12 July 2006 03:39, Georg Brandl wrote: Anyway, I'm just testing the waters. If it's not heresy then I'd like to do what I can to make it happen. IMO there's almost no chance this can go into 2.5. almost? I'll go you one better. No way at all will it

Re: [Python-Dev] get for lists and tuples?

2006-07-11 Thread Raymond Hettinger
Russell E. Owen wrote: I'd like to have the get method available for lists and tuples. (I figured this must have been discussed before but can't recall it and didn't turn anything up on google). It's obviously not a use-all-the-time method (or it'd already be there), but I find myself wanting

Re: [Python-Dev] Doctest and Footnotes

2006-07-11 Thread Phillip J. Eby
At 02:12 PM 7/11/2006 -0400, Alexander Belopolsky wrote: On 7/11/06, Benji York [EMAIL PROTECTED] wrote: [snip] I'm not quite sure what you're suggesting. A guess: put the code that isn't to be seen in the __test__ dict with a string key being the name of the footnote? That's right. I

Re: [Python-Dev] In defense of Capabilities [was: doc for new restricted execution design for Python]

2006-07-11 Thread Brett Cannon
On 7/11/06, Phillip J. Eby [EMAIL PROTECTED] wrote: At 10:56 AM 7/11/2006 -0700, Brett Cannon wrote:On 7/10/06, Talin mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote:(Although, I've often wished for Python to have a variant of __call__ that could be used to override individual methods,

Re: [Python-Dev] Doctest and Footnotes

2006-07-11 Thread Alexander Belopolsky
On 7/11/06, Fred Drake [EMAIL PROTECTED] wrote: On Tuesday 11 July 2006 14:12, Alexander Belopolsky wrote: Also __new__ and __init__ method docstrings is the natural place to put set-up code. Maybe, if all the tests required the same setup code. That's often not the case. That's true,

Re: [Python-Dev] urllib.quote and unicode bug resuscitation attempt

2006-07-11 Thread John J Lee
On Tue, 11 Jul 2006, Stefan Rank wrote: urllib.quote fails on unicode strings and in an unhelpful way:: [...] urllib.quote(u'a\xf1a') Traceback (most recent call last): File stdin, line 1, in ? File C:\Python24\lib\urllib.py, line 1117, in quote res =

Re: [Python-Dev] Doctest and Footnotes

2006-07-11 Thread Fred Drake
On Tuesday 11 July 2006 14:37, Alexander Belopolsky wrote: That's true, but you cannot test an object method without creating the object first. True. How the object is created can vary; if the creation affects the expected behavior in any way, you'll need be careful about how the

Re: [Python-Dev] In defense of Capabilities [was: doc for new restricted execution design for Python]

2006-07-11 Thread Phillip J. Eby
At 11:35 AM 7/11/2006 -0700, Brett Cannon wrote: On 7/11/06, Phillip J. Eby mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: At 10:56 AM 7/11/2006 -0700, Brett Cannon wrote: On 7/10/06, Talin mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED][EMAIL PROTECTED] wrote: (Although, I've often

[Python-Dev] PEP 356: python.org/sf/1515343 resolution

2006-07-11 Thread Jim Jewett
python.org/sf/1515343 fixes a regression against 2.4, which masks exceptions, and should therefore go in before release. The tracker has a patch to the test cases, and two alternative fixes. (One minimal, the other less ugly.) Since this only affects string exceptions with a value, it might be

Re: [Python-Dev] urllib.quote and unicode bug resuscitation attempt

2006-07-11 Thread Martin v. Löwis
Stefan Rank wrote: I suggest to add (after 2.5 I assume) one of the following to the beginning of urllib.quote to either fail early and consistently on unicode arguments and improve the error message:: if isinstance(s, unicode): raise TypeError(quote needs a byte string

Re: [Python-Dev] Minor: Unix icons for 2.5?

2006-07-11 Thread BJörn Lindqvist
I know the .desktop files have become fairly standard, but are these our responsibility or does that rest with the distributions/integrators? (I'm not objecting, but I'm not sure what the right thing really is since Python is an interpreter, not a desktop application.) The same anal argument

Re: [Python-Dev] Minor: Unix icons for 2.5?

2006-07-11 Thread Georg Brandl
Martin v. Löwis wrote: Georg Brandl wrote: In case we add a Python .desktop file (as proposed in patch #1353344), we'll need some PNGs in /usr/share/icons. A patch for Makefile.pre.in is attached. Independent of whether this should be done at all, I have a comment on the patch. Instead of

Re: [Python-Dev] User's complaints

2006-07-11 Thread Michael Ellerman
On 7/5/06, Neal Norwitz [EMAIL PROTECTED] wrote: On 7/4/06, Guido van Rossum [EMAIL PROTECTED] wrote: From actual users of the language I get more complaints about the breakneck speed of Python's evolution than about the brokenness of the current language. Guido, I'm really

[Python-Dev] Autoloading? (Making Queue.Queue easier to use)

2006-07-11 Thread Perkins, Christopher
John, I see what you are doing with the algorithm now, and I can easily re-factor it. What I am having issues with is how structured it is. 5 minute windows? Then running hours will always be recorded in 1/12th time steps. Would it not be more accurate to record engine time where the breaker

Re: [Python-Dev] User's complaints

2006-07-11 Thread skip
Michael Well here's one I stumbled across the other day. I don't know Michael if it's legit, but it's still bad PR: Michael http://www.gbch.net/gjb/blog/software/discuss/python-sucks.html Michael For the impatient, he's not at all bothered about the lack of Michael obscure

Re: [Python-Dev] User's complaints

2006-07-11 Thread Brett Cannon
On 7/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Michael Well here's one I stumbled across the other day. I don't knowMichael if it's legit, but it's still bad PR:Michael http://www.gbch.net/gjb/blog/software/discuss/python-sucks.htmlMichael For the impatient, he's not at all bothered about

Re: [Python-Dev] User's complaints

2006-07-11 Thread skip
Brett That whole entry is a little overblown. Well, sure. Think of it as a bug report with attitude. ;-) Brett That was done to fix buffer overflow issues when libc Brett implementations didn't do bound checks on the arguments to Brett strftime() and would index too far...

Re: [Python-Dev] urllib.quote and unicode bug resuscitation attempt

2006-07-11 Thread Anthony Baxter
On Wednesday 12 July 2006 07:16, Martin v. Löwis wrote: Stefan Rank wrote: I suggest to add (after 2.5 I assume) one of the following to the beginning of urllib.quote to either fail early and consistently on unicode arguments and improve the error message:: if isinstance(s, unicode):

[Python-Dev] changing time.strftime() to accept 0s (was: User's complaints)

2006-07-11 Thread Brett Cannon
On 7/11/06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Brett That whole entry is a little overblown.Well, sure.Think of it as a bug report with attitude. ;-)Brett That was done to fix buffer overflow issues when libcBrett implementations didn't do bound checks on the arguments to Brett strftime()

Re: [Python-Dev] Explicit Lexical Scoping (pre-PEP?)

2006-07-11 Thread Greg Ewing
Matthew Barnes wrote: its meaning in C/C++ (i.e. the symbol is defined outside of the current scope). It means more than that -- it means defined outside the current *file*. That's much too drastic for what we want. -- Greg ___ Python-Dev mailing

Re: [Python-Dev] [slighly OT] Native speakers and hurting brains

2006-07-11 Thread Nick Coghlan
Fredrik Lundh wrote: Boris Borcic wrote: in what language [is] the word sum an appropriate synonym for concatenate ? any that admits a+b to mean ''.join([a,b]), I'd say. and what human language would that be ? Python :) Sure-computers-can-speak-it-but-so-can-humans'ly yours, Nick. --

Re: [Python-Dev] [slighly OT] Native speakers and hurting brains

2006-07-11 Thread Greg Ewing
Boris Borcic wrote: sum() *is* exactly an attractive nuisance by *appearing* to be an obvious way of chaining strings in a list (without actually being one). But at least it fails immediately, prompting you to look in another direction. I admit that there is a step of arguable

Re: [Python-Dev] [slighly OT] Native speakers and hurting brains

2006-07-11 Thread Greg Ewing
Gareth McCaughan wrote: (I agree that Greg's interpretation is also not well supported by that thread; I was perhaps a bit excessive in claiming that language had nothing to do with it. What I meant was that it wasn't the *only* consideration. If there hadn't been any disadvantages, quite

Re: [Python-Dev] [slighly OT] Native speakers and hurting brains

2006-07-11 Thread Greg Ewing
Boris Borcic wrote: Fredrik Lundh wrote: in what language the word sum an appropriate synonym for concatenate ? any that admits a+b to mean ''.join([a,b]), I'd say. Not the same thing. a + b is usually pronounced a plus b. Now, plus has a somewhat wider meaning than sum. It sounds quite in

Re: [Python-Dev] urllib.quote and unicode bug resuscitation attempt

2006-07-11 Thread Martin v. Löwis
Anthony Baxter wrote: The right thing to do is IRIs. For 2.5, should we at least detect that it's unicode and raise a useful error? That can certainly be done, sure. Martin ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] changing time.strftime() to accept 0s (was: User's complaints)

2006-07-11 Thread Anthony Baxter
Making strftime accept 0s is fine to be checked in, since it's a regression (an understandable one, but what the hell). Making it accept less than 9 items and have useful defaults should wait for 2.6 ___ Python-Dev mailing list Python-Dev@python.org