Re: [Python-Dev] Re: No new features

2005-03-10 Thread Michael Hudson
Donovan Baarda [EMAIL PROTECTED] writes: G'day again, [...] You missed the minor releases bit in my post. major releases, ie 2.x - 3.0, are for things that can break existing code. They change the API so that things that run on 2.x may not work with 3.x. minor releases, ie 2.2.x -2.3.0,

Re: [Python-Dev] LinkedHashSet/LinkedHashMap equivalents

2005-03-10 Thread Michael Hudson
Delaney, Timothy C (Timothy) [EMAIL PROTECTED] writes: Set: Items are iterated over in the order that they are added. Adding an item that compares equal to one that is already in the set does not replace the item already in the set, and does not change the iteration order. Removing an item,

Re: [Python-Dev] Decimal returning NotImplemented (or not)

2005-03-10 Thread M.-A. Lemburg
Nick Coghlan wrote: Guido van Rossum wrote: No, the reason is that if we did this with exceptions, it would be liable to mask errors; an exception does not necessarily originate immediately with the code you invoked, it could have been raised by something else that was invoked by that code. The

Re: [Python-Dev] itemgetter/attrgetter extension

2005-03-10 Thread Nick Coghlan
Raymond Hettinger wrote: Any objections to extending itemgetter() and attrgetter() to be able to extract multiple fields at a time? # SELECT name, rank, serialnum FROM soldierdata map(attrgetter('name', 'rank', 'serialnum'), soldierdata) # SELECT * FROM soldierdata ORDER BY unit, rank,

Re: [Python-Dev] LinkedHashSet/LinkedHashMap equivalents

2005-03-10 Thread Nick Coghlan
Delaney, Timothy C (Timothy) wrote: OTOH, ordered set and ordered dict implies different things to different people - usually sorted rather than the order things were put in. Perhaps temporally-ordered ;) OTGH*, I would expect an OrderedDict / OrderedSet to have 'add to the end' semantics, but

Re: [Python-Dev] LinkedHashSet/LinkedHashMap equivalents

2005-03-10 Thread Barry Warsaw
On Wed, 2005-03-09 at 19:39, Tommy Burnette wrote: I'd say I'm +0. fwiw- I've been using a locally-rolled OrderedDict implementation for the last 5-6 years in which insertion order is the only order respected. I use it all over the place (in a code base of ~60k lines of python code). so

Re: [Python-Dev] LinkedHashSet/LinkedHashMap equivalents

2005-03-10 Thread BJörn Lindqvist
I would LOVE for **kwargs to be an ordered dict. It would allow me to write code like this: .class MyTuple: .def __init__(self, **kwargs): .self.__dict__ = ordereddict(kwargs) . .def __iter__(self): .for k, v in self.__dict__.items(): .yield v . .t = MyTuple(r

Re: [Python-Dev] LinkedHashSet/LinkedHashMap equivalents

2005-03-10 Thread Anthony Baxter
On Thursday 10 March 2005 17:29, Raymond Hettinger wrote: Or the implementation can have a switch to choose between keep-first logic or replace logic. The latter seems a bit odd to me. The key position would be determined by the first encountered while the value would be determined by the

[Python-Dev] Re: Python 2.4, distutils, and pure python packages

2005-03-10 Thread Thomas Heller
The following message is a courtesy copy of an article that has been posted to comp.lang.python as well. [CC to python-dev] Fuzzyman [EMAIL PROTECTED] writes: Python 2.4 is built with Microsoft Visiual C++ 7. This means that it uses msvcr7.dll, which *isn't* a standard part of the windows

RE: [Python-Dev] LinkedHashSet/LinkedHashMap equivalents

2005-03-10 Thread Raymond Hettinger
[BJörn Lindqvist] I would LOVE for **kwargs to be an ordered dict. It would allow me to write code like this: .class MyTuple: .def __init__(self, **kwargs): .self.__dict__ = ordereddict(kwargs) This doesn't work. The kwargs are already turned into a regular dictionary before

Re: [Python-Dev] SWT PyCon Sprint?

2005-03-10 Thread Phillip J. Eby
At 01:38 AM 3/10/05 -0500, Nicholas Bastin wrote: I realize that this is exceedingly late in the game, but is anybody interested in doing a Write-Python-Bindings-for-SWT sprint? It's been brought up before in various places, and PyCon seems the likely place to get enough concentrated knowledge

[Python-Dev] Can't build Zope on Windows w/ 2.4.1c1

2005-03-10 Thread Tim Peters
I don't know how far I'll get with this. Using the current Zope-2_7-branch of the Zope module at cvs.zope.org:/cvs-repository, building Zope via python setup.py build_ext -i worked fine when I got up today, using the released Python 2.4. One of its tests fails, because of a Python bug that

Re: [Python-Dev] Can't build Zope on Windows w/ 2.4.1c1

2005-03-10 Thread Anthony Baxter
It works on Linux, with Zope 2.7.4. Just as a note to others (I've mentioned this to Tim already) if you set an environment variable DISTUTILS_DEBUG before running a setup.py, you get very verbose information about what's going on, and, more importantly, full tracebacks rather than terse error

Re: [Python-Dev] Can't build Zope on Windows w/ 2.4.1c1

2005-03-10 Thread Tim Peters
[Anthony Baxter] It works on Linux, with Zope 2.7.4. Thanks! Just as a note to others (I've mentioned this to Tim already) if you set an environment variable DISTUTILS_DEBUG before running a setup.py, you get very verbose information about what's going on, and, more importantly, full

Re: [Python-Dev] Can't build Zope on Windows w/ 2.4.1c1

2005-03-10 Thread Tim Peters
This is going to need someone who understands distutils internals. The strings we end up passing to putenv() grow absurdly large, and sooner or later Windows gets very unhappy with them. os.py has a elif name in ('os2', 'nt'): # Where Env Var Names Must Be UPPERCASE class controlling

Re: [Python-Dev] Can't build Zope on Windows w/ 2.4.1c1

2005-03-10 Thread A.M. Kuchling
On Thu, Mar 10, 2005 at 12:46:23PM -0500, Tim Peters wrote: This is going to need someone who understands distutils internals. The strings we end up passing to putenv() grow absurdly large, and sooner or later Windows gets very unhappy with them. In distutils.msvccompiler: def __init__

Re: [Python-Dev] Can't build Zope on Windows w/ 2.4.1c1

2005-03-10 Thread Tim Peters
[ A.M. Kuchling] In distutils.msvccompiler: def __init__ (self, verbose=0, dry_run=0, force=0): ... self.initialized = False def compile(self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None,

Re: [Python-Dev] SWT PyCon Sprint?

2005-03-10 Thread Nicholas Bastin
On Mar 10, 2005, at 11:00 AM, Phillip J. Eby wrote: At 01:38 AM 3/10/05 -0500, Nicholas Bastin wrote: I realize that this is exceedingly late in the game, but is anybody interested in doing a Write-Python-Bindings-for-SWT sprint? It's been brought up before in various places, and PyCon seems

Re: [Python-Dev] Re: Can't build Zope on Windows w/ 2.4.1c1

2005-03-10 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Tim Peters wrote: | [Tres Seaver] | |Unit tests for Zope 2.7.4's 'zdaemon' package, which passed under Python |2.4, now fail under 2.4.1c1: | | | Are you sure they passed under 2.4? Yep. I showed output from that in the original post (and below). |

Re: [Python-Dev] SWT PyCon Sprint?

2005-03-10 Thread Phillip J. Eby
At 04:06 PM 3/10/05 -0500, Nicholas Bastin wrote: On Mar 10, 2005, at 11:00 AM, Phillip J. Eby wrote: At 01:38 AM 3/10/05 -0500, Nicholas Bastin wrote: I realize that this is exceedingly late in the game, but is anybody interested in doing a Write-Python-Bindings-for-SWT sprint? It's been

[Python-Dev] FWD: SD MAgazine.com - Jolt Awards Winners

2005-03-10 Thread Aahz
Guido may not be able to go. Anyone else already going? - Forwarded message from [EMAIL PROTECTED] - Subject: Request - SD MAgazine.com - Jolt Awards Winners To: [EMAIL PROTECTED] From: [EMAIL PROTECTED] Date: Thu, 10 Mar 2005 16:02:35 -0800 HI Python.org, You may or may not

[Python-Dev] Adding any() and all()

2005-03-10 Thread Guido van Rossum
See my blog: http://www.artima.com/forums/flat.jsp?forum=106thread=98196 Do we even need a PEP or is there a volunteer who'll add any() and all() for me? -- --Guido van Rossum (home page: http://www.python.org/~guido/) ___ Python-Dev mailing list

Re: [Python-Dev] RELEASED Python 2.4.1, release candidate 1

2005-03-10 Thread Martin v. Löwis
Anthony Baxter wrote: On behalf of the Python development team and the Python community, I'm happy to announce the release of Python 2.4.1 (release candidate 1). Python 2.4.1 is a bug-fix release. See the release notes at the website (also available as Misc/NEWS in the source distribution) for

RE: [Python-Dev] Adding any() and all()

2005-03-10 Thread Raymond Hettinger
See my blog: http://www.artima.com/forums/flat.jsp?forum=106thread=98196 Do we even need a PEP or is there a volunteer who'll add any() and all() for me? I'll volunteer for this one. Will leave it open for discussion for a bit so that folks can voice any thoughts on the design. Raymond

Re: [Python-Dev] Adding any() and all()

2005-03-10 Thread Phillip J. Eby
At 06:38 PM 3/10/05 -0800, Bill Janssen wrote: Guido, I think there should be a PEP. For instance, I think I'd want them to be: def any(S): for x in S: if x: return x return S[-1] def all(S): for x in S: if not x: return x return S[-1] Or perhaps these should be called

RE: [Python-Dev] Adding any() and all()

2005-03-10 Thread Raymond Hettinger
[Bill Janssen] I think I'd want them to be: def any(S): for x in S: if x: return x return S[-1] def all(S): for x in S: if not x: return x return S[-1] Or perhaps these should be called first and last. -1 Over time, I've gotten feedback about these

Re: [Python-Dev] Re: Can't build Zope on Windows w/ 2.4.1c1

2005-03-10 Thread Anthony Baxter
On Friday 11 March 2005 08:09, Tres Seaver wrote: |By staring at the code of the failing test, it looks like the MRO of the |testcase class has changed: it declares a 'run' method, which is |supposed to run the external process, which clashes with the 'run' |method of unittest.TestCase. I

[Python-Dev] branch release24-maint is unfrozen, 2.4.1rc2?

2005-03-10 Thread Anthony Baxter
Ok, the branch is unfrozen. At the current point in time, I think we're going to need an rc2. Anthony -- Anthony Baxter [EMAIL PROTECTED] It's never too late to have a happy childhood. ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] Adding any() and all()

2005-03-10 Thread Bill Janssen
Over time, I've gotten feedback about these and other itertools recipes. No one has objected to the True/False return values in those recipes or in Guido's version. Guido's version matches the normal expectation of any/all being a predicate. Also, it avoids the kind of errors/confusion

Re: [Python-Dev] Adding any() and all()

2005-03-10 Thread Jack Diederich
On Thu, Mar 10, 2005 at 10:22:45PM -0500, Raymond Hettinger wrote: [Bill Janssen] I think I'd want them to be: def any(S): for x in S: if x: return x return S[-1] def all(S): for x in S: if not x: return x return S[-1] Or perhaps these

Re: [Python-Dev] Urllib code or the docs appear wrong

2005-03-10 Thread Skip Montanaro
It seems to me that either urllib's docs are wrong or its code is wrong w.r.t. how the User-agent header is handled. Guido I propose fixing the docs... Done (also backported to 2.4 branch). Skip ___ Python-Dev mailing list

Re: No new features (was Re: [Python-Dev] Re: [Python-checkins] python/dist/src/Modules ossaudiodev.c, 1.35, 1.36)

2005-03-10 Thread Skip Montanaro
Anthony Initially, I was inclined to be much less anal about the Anthony no-new-features thing. But since doing it, I've had a quite Anthony large number of people tell me how much they appreciate this Anthony approach - vendors, large companies with huge installed bases

Re: [Python-Dev] rationale for the no-new-features approach

2005-03-10 Thread Skip Montanaro
Anthony Goal 4: Try and prevent something like Anthony try: Anthony True, False Anthony except NameError: Anthony True, False = 1, 0 Anthony from ever ever happening again. I will point out that in

Re: [Python-Dev] RELEASED Python 2.4.1, release candidate 1

2005-03-10 Thread Tim Peters
[Martin v. Löwis] I'd like to encourage feedback on whether the Windows installer works for people. It replaces the VBScript part in the MSI package with native code, which ought to drop the dependency on VBScript, but might introduce new incompatibilities. Worked fine here. Did an

Re: [Python-Dev] rationale for the no-new-features approach

2005-03-10 Thread Bob Ippolito
On Mar 9, 2005, at 8:03 AM, Skip Montanaro wrote: Anthony Goal 4: Try and prevent something like Anthony try: Anthony True, False Anthony except NameError: Anthony True, False = 1, 0 Anthony from ever

Re: [Python-Dev] Adding any() and all()

2005-03-10 Thread Aahz
On Thu, Mar 10, 2005, Bill Janssen wrote: Raymond Hettinger: Over time, I've gotten feedback about these and other itertools recipes. No one has objected to the True/False return values in those recipes or in Guido's version. Guido's version matches the normal expectation of any/all being

RE: [Python-Dev] RELEASED Python 2.4.1, release candidate 1

2005-03-10 Thread Tony Meyer
[Martin v. Löwis] I'd like to encourage feedback on whether the Windows installer works for people. It replaces the VBScript part in the MSI package with native code, which ought to drop the dependency on VBScript, but might introduce new incompatibilities. [Tim Peters] Worked fine here.