Re: [Python-Dev] docstring before function declaration

2005-03-20 Thread Anthony Baxter
On Monday 21 March 2005 18:10, Nicholas Jacobson wrote: > IIRC, Guido once mentioned that he regretted not > setting function docstrings to come before the > function declaration line, instead of after. How do you distinguish between a docstring at the top of a module that's immediately followed

[Python-Dev] docstring before function declaration

2005-03-20 Thread Nicholas Jacobson
IIRC, Guido once mentioned that he regretted not setting function docstrings to come before the function declaration line, instead of after. i.e. """This describes class Bar.""" class Bar: ... Or with a decorator: """This describes class Bar.""" @classmethod class Bar: ... Versus the curre

Re: [Python-Dev] Draft PEP to make file objects support non-blocking mode.

2005-03-20 Thread Greg Ewing
On 18 March 2005, Donovan Baarda said: Many Python library methods and classes like select.select(), os.popen2(), and subprocess.Popen() return and/or operate on builtin file objects. However even simple applications of these methods and classes require the files to be in non-blocking mode. I don'

Re: [Python-Dev] Draft PEP to make file objects support non-blocking mode.

2005-03-20 Thread Donovan Baarda
On Fri, 2005-03-18 at 20:41 -0500, James Y Knight wrote: > On Mar 18, 2005, at 8:19 PM, Greg Ward wrote: > > Is having to use fcntl and os really so awful? At least it requires > > the programmer to prove he knows what he's doing putting this file > > into non-blocking mode, and that he really wan

[Python-Dev] Re: [Csv] Example workaround classes for using Unicode with csv module...

2005-03-20 Thread Andrew McNamara
>I added UnicodeReader and UnicodeWriter example classes to the csv module >docs just now. They mention problems with ASCII NUL characters (which I >vaguely remember - NUL-terminated strings are used internally, right?). Do >NULs still present a problem? I saw nothing in the log messages that >m

Re: [Python-Dev] [AST] Procedure for AST Branch patches

2005-03-20 Thread Brett C.
Grant Olson wrote: Make sure "AST" is used in the subject line; e.g., "[AST]" at the beginning. Unfortunately the AST group is only available for patches; not listed for bug reports (don't know why; can this be fixed?). Other than that, just assign it to me since I will most likely be doin

RE: [Python-Dev] [AST] Procedure for AST Branch patches

2005-03-20 Thread Grant Olson
> Make sure "AST" is used in the subject line; e.g., "[AST]" at > the beginning. > Unfortunately the AST group is only available for patches; > not listed for bug reports (don't know why; can this be fixed?). > > Other than that, just assign it to me since I will most > likely be doing AST

Re: [Python-Dev] identity operands (was python-dev Summary for 2005-03-01 through 2005-03-15 [draft])

2005-03-20 Thread Timothy Fitz
[Nick Coghlan] > So, using "".join is roughly three times as fast as abusing sum :) True in the case where you're concatenating three strings, but what about 100 strings? (Full source attached) Py> timeit.Timer("sum(strings, ai)", setup).repeat() [33.553668413164239, 32.861660909417253, 33.092705

RE: [Python-Dev] Python 2.4 | 7.3 The for statement

2005-03-20 Thread Andrew Koenig
> for_stmt ::= "for" target_list "in" expression_list > [ "and" expression ] ":" > suite ["else" ":" suite] It can't work. The expression_list could be just a variable, as could the expression, in which case you get "for" target_list "in" variable "and" variable ":" and, of course

Re: [Python-Dev] Re: Change 'env var BROWSER override' semantics in webbrowser.py

2005-03-20 Thread Oleg Broytmann
On Sun, Mar 20, 2005 at 11:40:27AM -0300, [EMAIL PROTECTED] wrote: > Perhaps you could focus in 728278. It addresses some of the issues you > have addressed in 754022, but it is not properly formatted. I started to look at it yesterday, but it's so big and does so many things at once... it requ

Re: [Python-Dev] [AST] Procedure for AST Branch patches

2005-03-20 Thread Tim Peters
[Brett C.] > Make sure "AST" is used in the subject line; e.g., "[AST]" at the beginning. > Unfortunately the AST group is only available for patches; not listed for bug > reports (don't know why; can this be fixed?). Your wish is my command: there's an AST group in Python's bug tracker now. FYI

Re: [Python-Dev] [AST] Procedure for AST Branch patches

2005-03-20 Thread Brett C.
Nick Coghlan wrote: What's the current situation with providing fixes for AST branch problems? Make sure "AST" is used in the subject line; e.g., "[AST]" at the beginning. Unfortunately the AST group is only available for patches; not listed for bug reports (don't know why; can this be fixed?).

Re: [Python-Dev] Change 'env var BROWSER override' semantics in webbrowser.py

2005-03-20 Thread rodsenra
> Rodrigo Dias Arruda Senra wrote: >> I propose a small change in webbrowse.py module. > > I think I'm generally in favour of such a change. Thanks. I'm glad to know! > - please don't post patches to python-dev, Sorry. I'm aware of that. For clarification's sake, I was not _posting_ a patch to

Re: [Python-Dev] Re: Change 'env var BROWSER override' semantics in webbrowser.py

2005-03-20 Thread rodsenra
>I am in game, as one of those patches is mine. I've started to review > patches... Hi Oleg, Perhaps you could focus in 728278. It addresses some of the issues you have addressed in 754022, but it is not properly formatted. If you could merge into your patch the result of "set(728278)-set(75

Re: [Python-Dev] Re: Change 'env var BROWSER override' semantics in webbrowser.py

2005-03-20 Thread rodsenra
> On Friday 18 March 2005 17:44, Reinhold Birkenfeld wrote: > > Additionally, there are several patches on SF that pertain to > > webbrowser.py; perhaps you can review some of them... By all means. Done! > Given the time I haven't been able to devote to the webbrowser module, a > consolidated

[Python-Dev] Patch review: all webbrowser.py related patches up to 2005-03-20

2005-03-20 Thread rodsenra
1144816 webbrowser.Netscape.open bug fix - 1077979 Simple webbrowser fix for netscape -remote - 1144816 and 1077979 are the the same patch, as documented in a comment

[Python-Dev] [AST] Procedure for AST Branch patches

2005-03-20 Thread Nick Coghlan
What's the current situation with providing fixes for AST branch problems? There's a simple one in parsenumber in Python/ast.c relating to int/long unification and octal literals. The fix is just a direct copy of the relevant code from parsenumber in the old compile.c. Fixing it means the only f