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

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

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 scott+python-...@scottdial.com 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

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 for

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 written program text. You

[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

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 luke.leigh...@googlemail.com 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

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 luke.leigh...@googlemail.com 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.

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 Microsoft

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 tles...@gmail.com wrote: On Tue, Jan 20, 2009 at 08:02, Luke Kenneth Casson Leighton luke.leigh...@googlemail.com wrote: of course - if python for win32 ENTIRELY DROPPED msvc as a development platform, and went for an entirely free software

[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

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, python-3...@udmvt.ru wrote: On

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

[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

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 l...@lkcl.net 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

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 that will

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 p.f.mo...@gmail.com wrote: 2009/1/20 Benjamin Peterson benja...@python.org: 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

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 first

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 is

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 would this

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,

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 stop

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 algor...@yahoo.com wrote: - Mensaje original De: python-3...@udmvt.ru python-3...@udmvt.ru Para: Gerald Britton gerald.brit...@gmail.com CC: python-dev@python.org Enviado:

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 in

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

2009-01-20 Thread Antoine Pitrou
Alexey G. Shpagin python-3000 at 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

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

2009-01-20 Thread Vitor Bosshard
- Mensaje original De: Gerald Britton gerald.brit...@gmail.com Para: Vitor Bosshard algor...@yahoo.com 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

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 algor...@yahoo.com wrote: - Mensaje original De: python-3...@udmvt.ru python-3...@udmvt.ru Para: Gerald Britton gerald.brit...@gmail.com CC: python-dev@python.org Enviado: martes, 20 de enero, 2009 11:18:24

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 gerald.brit...@gmail.com 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

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 python-3000 at 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] __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 rha...@gmail.com wrote: On Sun, Jan 18, 2009 at 9:32 PM, Guido van Rossum gu...@python.org wrote: On Sun, Jan 18, 2009 at 5:38 PM, Gregory P. Smith g...@krypto.org wrote: +1 on getting rid of the IOBase __del__ in the C rewrite in favor of

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

2009-01-20 Thread Nick Coghlan
Antoine Pitrou wrote: Alexey G. Shpagin python-3000 at 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

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

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 system,

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 simple

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

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 python-3000 at 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

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

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 *original

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

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

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Benjamin Peterson
On Tue, Jan 20, 2009 at 5:36 PM, Raymond Hettinger pyt...@rcn.com 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

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_

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Guido van Rossum
2009/1/20 Raymond Hettinger pyt...@rcn.com: 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.

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
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 pyt...@rcn.com wrote: [Raymond Hettinger] I'm at a loss of why the notice needs

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

Re: [Python-Dev] Copyright notices in modules

2009-01-20 Thread Terry Reedy
Guido van Rossum wrote: 2009/1/20 Raymond Hettinger pyt...@rcn.com: 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