[Python-Dev] PEP 309 (Was: Patch review: [ 1094542 ] add Bunch type to collections module)

2005-01-27 Thread Paul Moore
On Thu, 27 Jan 2005 01:07:06 -0700, Fernando Perez [EMAIL PROTECTED] wrote: I really would like to see such a class in the stdlib, as it's something that pretty much everyone ends up rewriting. I certainly don't claim my implementation to be a good reference (it isn't). But perhaps it can be

Re: [Python-Dev] Patch review: [ 1009811 ] Add missing types to__builtin__

2005-01-27 Thread Guido van Rossum
On Thu, 27 Jan 2005 02:01:20 -0500, James Y Knight [EMAIL PROTECTED] wrote: Basically, I'd like to see them be given a binding somewhere, and have their claimed module agree with that, but am not particular as to where. Option #2 seemed to be rejected last time, and option #1 was given

RE: [Python-Dev] Patch review: [ 1009811 ] Add missing typesto__builtin__

2005-01-27 Thread Raymond Hettinger
[James Y Knight] Basically, I'd like to see them be given a binding somewhere, and have their claimed module agree with that, but am not particular as to where. Option #2 seemed to be rejected last time, and option #1 was given approval, so that's what I wrote a patch for. It sounds like

Re: [Python-Dev] Re: Patch review: [ 1094542 ] add Bunch type to collections module

2005-01-27 Thread Steven Bethard
Fernando Perez [EMAIL PROTECTED] wrote: Alan Green [EMAIL PROTECTED] wrote: Steven Bethard is proposing a new collection class named Bunch. I had a few suggestions which I attached as comments to the patch - but what is really required is a bit more work on the draft PEP, and then

Re: [Python-Dev] Patch review: [ 1009811 ] Add missing types to__builtin__

2005-01-27 Thread Martin v. Lwis
James Y Knight wrote: Sooo should (for 'generator' in objects that claim to be in __builtins__ but aren't), 1) 'generator' be added to __builtins__ 2) 'generator' be added to types.py and its __module__ be set to 'types' 3) 'generator' be added to newmodule.py and its __module__ be set to

Re: [Python-Dev] Patch review: [ 1009811 ] Add missing types to__builtin__

2005-01-27 Thread Martin v. Lwis
Raymond Hettinger wrote: Other than a vague feeling of completeness is there any reason this needs to be done? Is there anything useful that currently cannot be expressed without this new module? That I wonder myself, too. Regards, Martin ___

[Python-Dev] Re: Re: Patch review: [ 1094542 ] add Bunch type to collections module

2005-01-27 Thread Fernando Perez
Steven Bethard wrote: Fernando Perez [EMAIL PROTECTED] wrote: My feeling about this is that if the name of the attribute is held in a variable, you should be using a dict, not a Bunch/Struct. If you have a Bunch/Struct and decide you want a dict instead, you can just use vars: py b =

Re: [Python-Dev] Re: Re: Re: Patch review: [ 1094542 ] add Bunch type to collections module

2005-01-27 Thread Steven Bethard
On Thu, 27 Jan 2005 18:31:55 -0700, Fernando Perez [EMAIL PROTECTED] wrote: However, I think it would perhaps be best to advertise any methods of Bunch as strictly classmethods from day 1. Otherwise, you can have: b = Bunch() b.update(otherdict) - otherdict happens to have an 'update' key

[Python-Dev] Re: [Python-checkins] python/dist/src/Lib/idlelib EditorWindow.py, 1.65, 1.66 NEWS.txt, 1.53, 1.54 config-keys.def, 1.21, 1.22 configHandler.py, 1.37, 1.38

2005-01-27 Thread Guido van Rossum
Thanks!!! On Thu, 27 Jan 2005 16:16:19 -0800, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Update of /cvsroot/python/python/dist/src/Lib/idlelib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5316 Modified Files: EditorWindow.py NEWS.txt config-keys.def configHandler.py Log

Re: [Python-Dev] Patch review: [ 1009811 ] Add missing types to__builtin__

2005-01-27 Thread Jeff Rush
On Thu, 2005-01-27 at 17:24, Martin v. Löwis wrote: Raymond Hettinger wrote: Other than a vague feeling of completeness is there any reason this needs to be done? Is there anything useful that currently cannot be expressed without this new module? That I wonder myself, too. One