Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Terry Reedy
Guido van Rossum wrote: 2009/1/20 Raymond Hettinger : I'm at a loss of why the notice needs to be there at all. There's a difference between contributing a whole file and contributing a patch. Patches do not require copyright notices. Whole files do. This is not affected by later edits to the

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Terry Reedy
Steven D'Aprano wrote: Another argument against the PEP was that it breaks the correspondence between the generator expression and the equivalent for-loop. I had never even noticed such correspondence before, because to my eyes the most important term is the yielded expression, not the scaffo

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Guido van Rossum
I would be all for cleaning up, if the lawyers agree, but I've spent enough time talking to lawyers for the rest of my life. You know where to reach Van Lindberg. On Tue, Jan 20, 2009 at 5:20 PM, Raymond Hettinger wrote: > > [Raymond Hettinger] >>> >>> I'm at a loss of why the notice needs to be

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Raymond Hettinger
[Raymond Hettinger] I'm at a loss of why the notice needs to be there at all. [GvR] There's a difference between contributing a whole file and contributing a patch. Patches do not require copyright notices. Whole files do. This is not affected by later edits to the file. That makes sense.

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Guido van Rossum
2009/1/20 Raymond Hettinger : > I'm at a loss of why the notice needs to be there at all. There's a difference between contributing a whole file and contributing a patch. Patches do not require copyright notices. Whole files do. This is not affected by later edits to the file. > AFAICT, we've > h

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-20 Thread Terry Reedy
Luke Kenneth Casson Leighton wrote: this is a fairly important issue for python development interoperability - martin mentioned that releases of mingw-compiled python, if done with a non-interoperable version of msvcrt, would cause much mayhem. well, compiling python on mingw with msvcr80 _can_ b

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Benjamin Peterson
On Tue, Jan 20, 2009 at 5:36 PM, Raymond Hettinger wrote: > [Terry Reedy] >> >> Bottom line to me. The current notion of copyright does not work too well >> with evolving, loosely collective works (which eventually become >> 'folklore'). > > I'm at a loss of why the notice needs to be there at al

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Raymond Hettinger
[Terry Reedy] Bottom line to me. The current notion of copyright does not work too well with evolving, loosely collective works (which eventually become 'folklore'). I'm at a loss of why the notice needs to be there at all. AFAICT, we've had tons of contributions from googlers and only one h

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Terry Reedy
Gerald Britton wrote: I wonder if this is a bug? It is a known glitch reported last summer. Devs decided not to fix because doing so would, in the patches tried, slow list comps significantly. Also, the documented intent and expected usage of StopIteration is this "exception StopIteratio

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread M.-A. Lemburg
On 2009-01-20 16:54, Stephen J. Turnbull wrote: > M.-A. Lemburg writes: > > On 2009-01-20 11:02, Michael Foord wrote: > > > > Mere collections of facts are not copyrightable as they are not > > > creative (the basis of copyright) > > That's incorrect in the U.S.; what is copyrightable is an *o

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Terry Reedy
M.-A. Lemburg wrote: On 2009-01-20 00:56, Raymond Hettinger wrote: Why does numbers.py say: # Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. Because that's where that file originated, I guess. This is part of what you have to do for thi

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Steven D'Aprano
On Wed, 21 Jan 2009 03:56:06 am Antoine Pitrou wrote: > Alexey G. Shpagin udmvt.ru> writes: > > Example will look like > > g = (n for n in range(100) if n*n < 50 or else_break()) > > Please don't suggest any hack involving raising StopIteration as part > of a conditional statement in a generator

Re: [Python-Dev] Strategies for debugging buildbot failures?

2009-01-20 Thread Mark Dickinson
Thanks for all the feedback. [Michael Foord] > At Resolver Systems we regularly extend the test framework purely > to provide more diagnostic information in the event of test failures. > We do a lot of functional testing through the UI, which is particularly > prone to intermittent and hard to dia

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-20 Thread Martin v. Löwis
>> That's a non-starter for anyone who incorporates Python in an existing >> MSVC-based development environment. > > surely incorporating libpython2.5.dll.a or libpython2.6.dll.a, along > with the .def and the importlib that's generated with dlldump, unless > i'm missing something, would be a simp

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-20 Thread Nick Coghlan
Luke Kenneth Casson Leighton wrote: > i'd say "great" - but given a choice of "impressive profile guided > optimisation plus a proprietary compiler, proprietary operating system > _and_ being forced to purchase a system _capable_ of running said > proprietary compiler, said proprietary operating sy

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Nick Coghlan
Gerald Britton wrote: > I wonder if this is a bug? Nope, it's part of the defined behaviour. Avoiding the overhead of the GE machinery is actually the main advantage in using a comprehension over the equivalent generator expression. Deliberately raising StopIteration is about the only way to notic

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Nick Coghlan
Antoine Pitrou wrote: > Alexey G. Shpagin udmvt.ru> writes: >> Example will look like >> g = (n for n in range(100) if n*n < 50 or else_break()) > > Please don't suggest any hack involving raising StopIteration as part of a > conditional statement in a generator expression. It might work today,

Re: [Python-Dev] __del__ and tp_dealloc in the IO lib

2009-01-20 Thread Guido van Rossum
On Sun, Jan 18, 2009 at 11:49 PM, Adam Olsen wrote: > On Sun, Jan 18, 2009 at 9:32 PM, Guido van Rossum wrote: >> On Sun, Jan 18, 2009 at 5:38 PM, Gregory P. Smith wrote: >>> +1 on getting rid of the IOBase __del__ in the C rewrite in favor of >>> tp_dealloc. >>> >>> On Sun, Jan 18, 2009 at 11:5

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread rdmurray
On Tue, 20 Jan 2009 at 16:56, Antoine Pitrou wrote: Alexey G. Shpagin udmvt.ru> writes: Example will look like g = (n for n in range(100) if n*n < 50 or else_break()) Please don't suggest any hack involving raising StopIteration as part of a conditional statement in a generator expression.

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Calvin Spealman
On Tue, Jan 20, 2009 at 12:46 PM, Gerald Britton wrote: > I wonder if this is a bug? I don't think so, but its interesting nonetheless. passing a generator expression to list() involves two loops: the list construction and the generator expression. So, a StopIteration from whatever the GE is ite

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Gerald Britton
I wonder if this is a bug? On Tue, Jan 20, 2009 at 11:32 AM, Vitor Bosshard wrote: > - Mensaje original >> De: "python-3...@udmvt.ru" >> Para: Gerald Britton >> CC: python-dev@python.org >> Enviado: martes, 20 de enero, 2009 11:18:24 >> Asunto: Re: [Python-Dev] PEP 3142: Add a "while"

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Calvin Spealman
On Tue, Jan 20, 2009 at 12:00 PM, Vitor Bosshard wrote: > > > - Mensaje original >> De: Gerald Britton >> Para: Vitor Bosshard >> CC: python-3...@udmvt.ru; python-dev@python.org >> Enviado: martes, 20 de enero, 2009 13:40:07 >> Asunto: Re: [Python-Dev] PEP 3142: Add a "while" clause to

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Vitor Bosshard
- Mensaje original > De: Gerald Britton > Para: Vitor Bosshard > CC: python-3...@udmvt.ru; python-dev@python.org > Enviado: martes, 20 de enero, 2009 13:40:07 > Asunto: Re: [Python-Dev] PEP 3142: Add a "while" clause to generator > expressions > > Right, but the PEP is only about gen

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Antoine Pitrou
Alexey G. Shpagin udmvt.ru> writes: > > Example will look like > g = (n for n in range(100) if n*n < 50 or else_break()) Please don't suggest any hack involving raising StopIteration as part of a conditional statement in a generator expression. It might work today, but it might as well break to

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Michael Foord
Stephen J. Turnbull wrote: M.-A. Lemburg writes: > On 2009-01-20 11:02, Michael Foord wrote: > > Mere collections of facts are not copyrightable as they are not > > creative (the basis of copyright) That's incorrect in the U.S.; what is copyrightable is an *original work of expression fixed

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Gerald Britton
Right, but the PEP is only about generator expressions. On Tue, Jan 20, 2009 at 11:32 AM, Vitor Bosshard wrote: > - Mensaje original >> De: "python-3...@udmvt.ru" >> Para: Gerald Britton >> CC: python-dev@python.org >> Enviado: martes, 20 de enero, 2009 11:18:24 >> Asunto: Re: [Python-

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Vitor Bosshard
- Mensaje original > De: "python-3...@udmvt.ru" > Para: Gerald Britton > CC: python-dev@python.org > Enviado: martes, 20 de enero, 2009 11:18:24 > Asunto: Re: [Python-Dev] PEP 3142: Add a "while" clause to generator > expressions > > May I suggest you this variant? > >     def raiseSt

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Sturla Molden
On 1/20/2009 4:45 PM, Gerald Britton wrote: OK, so your suggestion: g = (n for n in range(100) if n*n < 50 or raiseStopIteration()) really means "return in in the range 0-99 if n-squared is less than 50 or the function raiseStopIteration() returns True". How would this get the generator to st

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Gerald Britton
Yup, I tried your idea and it does work as I intended. It looks a little better than using takewhile, but not (to me anyway) as nice as my original suggestion. Still, if my idea is ultimately rejected (looks that way at the moment), this is a good alternative. On Tue, Jan 20, 2009 at 10:57 AM, A

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Alexey G. Shpagin
On Tue, Jan 20, 2009 at 10:45:27AM -0500, Gerald Britton wrote: > OK, so your suggestion: > > g = (n for n in range(100) if n*n < 50 or raiseStopIteration()) > > really means "return in in the range 0-99 if n-squared is less than 50 > or the function raiseStopIteration() returns True". > > How

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Stephen J. Turnbull
M.-A. Lemburg writes: > On 2009-01-20 11:02, Michael Foord wrote: > > Mere collections of facts are not copyrightable as they are not > > creative (the basis of copyright) That's incorrect in the U.S.; what is copyrightable is an *original work of expression fixed in some medium*. "Original"

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Gerald Britton
OK, so your suggestion: g = (n for n in range(100) if n*n < 50 or raiseStopIteration()) really means "return in in the range 0-99 if n-squared is less than 50 or the function raiseStopIteration() returns True". How would this get the generator to stop once n*n >=50? It looks instead like the fi

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-20 Thread Benjamin Peterson
On Tue, Jan 20, 2009 at 8:39 AM, Paul Moore wrote: > 2009/1/20 Benjamin Peterson : >> We might be opening a can of worms, though. Do we document everything >> that takes a dictionary argument with collections.Mapping or >> everything that takes a integer numbers.Rationale? What if multiple >> type

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Alexey G. Shpagin
On Tue, Jan 20, 2009 at 09:24:32AM -0500, Gerald Britton wrote: > hmmm...doesn't: > > if n*n < 50 or raise StopIteration() > > really mean, "Return an integer in the range 0-99 if n-squared is less > than fifty or the statement 'raise StopIteration()' returns True" ? > > I'm not sure that th

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-20 Thread Curt Hagenlocher
On Tue, Jan 20, 2009 at 6:18 AM, Luke Kenneth Casson Leighton wrote: > > yeah they said the same thing about "gas ovens", too. not the nazi > gas ovens, the phrase my mother used to say "if someone stuck their > head in a gas oven, would you do the same?". I don't know who is forcing you to use

[Python-Dev] Adapt test suite for other Python impls

2009-01-20 Thread Armin Rigo
Hi all, There is a pending patch issue at http://bugs.python.org/issue4242 which proposes to tag, in the CPython test suite, which tests are general language tests (the vast majority) and which ones are specific to CPython. The patch would add a couple of helpful functions to test_support.py (htt

Re: [Python-Dev] bundlebuilder broken in 2.6

2009-01-20 Thread Ronald Oussoren
On 18 Jan, 2009, at 18:10, Barry Scott wrote: While the build should be fixed for 2.6+ (I'll send a patch), note that bundlebuilder is gone in 3.0. What is the replacement for bundlebuilder for 3.0? Lack of bundlebuilder becomes a serious porting problem for me. I deliver pysvn WOrkbench

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-20 Thread Paul Moore
2009/1/20 Benjamin Peterson : > We might be opening a can of worms, though. Do we document everything > that takes a dictionary argument with collections.Mapping or > everything that takes a integer numbers.Rationale? What if multiple > types are possible? No. Only document things as taking an ABC

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-20 Thread Benjamin Peterson
On Mon, Jan 19, 2009 at 11:56 PM, Brett Cannon wrote: > On Mon, Jan 19, 2009 at 19:19, Benjamin Peterson wrote: >> On Mon, Jan 19, 2009 at 9:11 PM, Brett Cannon wrote: >>> On Mon, Jan 19, 2009 at 19:01, Benjamin Peterson >>> wrote: On Mon, Jan 19, 2009 at 8:24 PM, Brett Cannon wrote: >>>

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread python-3000
On Mon, Jan 19, 2009 at 10:10:00AM -0500, Gerald Britton wrote: > Please find below PEP 3142: Add a "while" clause to generator > expressions. I'm looking for feedback and discussion. > ... > g = (n for n in range(100) while n*n < 50) May I suggest you this variant? def raiseStopI

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Gerald Britton
hmmm...doesn't: if n*n < 50 or raise StopIteration() really mean, "Return an integer in the range 0-99 if n-squared is less than fifty or the statement 'raise StopIteration()' returns True" ? I'm not sure that that will work. On Tue, Jan 20, 2009 at 9:18 AM, wrote: > On Mon, Jan 19, 2009

[Python-Dev] one last go at msvcr80 / msvcr90 assemblies - mingw build of python

2009-01-20 Thread Luke Kenneth Casson Leighton
could someone kindly send me the assembly files that are created by a proprietary win32 build of python2.5, 2.6 and trunk, the ones used to create the dll _and_ the python.exe many thanks. ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyth

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-20 Thread Luke Kenneth Casson Leighton
On Tue, Jan 20, 2009 at 1:11 PM, Tim Lesher wrote: > On Tue, Jan 20, 2009 at 08:02, Luke Kenneth Casson Leighton > wrote: >> of course - if python for win32 ENTIRELY DROPPED msvc as a development >> platform, and went for an entirely free software development >> toolchain, then this problem goes

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-20 Thread Christian Heimes
Luke Kenneth Casson Leighton schrieb: > of course - if python for win32 ENTIRELY DROPPED msvc as a development > platform, and went for an entirely free software development > toolchain, then this problem goes away. > > thoughts, anyone? That's not going to happen anytime soon. As long as Microso

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-20 Thread Michael Foord
Tim Lesher wrote: On Tue, Jan 20, 2009 at 08:02, Luke Kenneth Casson Leighton wrote: of course - if python for win32 ENTIRELY DROPPED msvc as a development platform, and went for an entirely free software development toolchain, then this problem goes away. That's a non-starter for any

Re: [Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-20 Thread Tim Lesher
On Tue, Jan 20, 2009 at 08:02, Luke Kenneth Casson Leighton wrote: > of course - if python for win32 ENTIRELY DROPPED msvc as a development > platform, and went for an entirely free software development > toolchain, then this problem goes away. That's a non-starter for anyone who incorporates Pyt

[Python-Dev] compiling python2.5 (msys+mingw+wine) - giving up using msvcr80 assemblies for now

2009-01-20 Thread Luke Kenneth Casson Leighton
folks, hi, this is a fairly important issue for python development interoperability - martin mentioned that releases of mingw-compiled python, if done with a non-interoperable version of msvcrt, would cause much mayhem. well, compiling python on mingw with msvcr80 _can_ be done; using it can also b

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread M.-A. Lemburg
On 2009-01-20 11:02, Michael Foord wrote: > M.-A. Lemburg wrote: >> [snip...] >> >>> Does the copyright concept even apply to an >>> abstract base class (I thought APIs were not >>> subject to copyright, just like database layouts >>> and language definitions)? >>> >> >> It applies to the wr

Re: [Python-Dev] PEP 3142: Add a "while" clause to generator expressions

2009-01-20 Thread Nick Coghlan
Kristján Valur Jónsson wrote: > Are you all certain that this mapping from a generator expression to > a foor loop isn't just a happy coincidence? After all, the generator > statement is just a generalization of the list comprehension and that > doesn't map quite so directly. The mapping of the fo

Re: [Python-Dev] Questions/comments on documentation formatting

2009-01-20 Thread Michael Foord
Brett Cannon wrote: On Mon, Jan 19, 2009 at 19:02, Scott Dial wrote: Brett Cannon wrote: 3. Are brackets for optional arguments (e.g. ``def fxn(a [, b=None [, c=None]])``) really necessary when default argument values are present? And do we really need to nest the brackets when it is o

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Michael Foord
M.-A. Lemburg wrote: [snip...] Does the copyright concept even apply to an abstract base class (I thought APIs were not subject to copyright, just like database layouts and language definitions)? It applies to the written program text. You are probably thinking about other IP rights su

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread M.-A. Lemburg
On 2009-01-20 00:56, Raymond Hettinger wrote: > Why does numbers.py say: > ># Copyright 2007 Google, Inc. All Rights Reserved. ># Licensed to PSF under a Contributor Agreement. Because that's where that file originated, I guess. This is part of what you have to do for things that are lice