Re: [Python-Dev] [Python-checkins] cpython (3.3): PythonCAD is now on PyQt, use Wing as a prominent PyGtk example.

2013-10-07 Thread A.M. Kuchling
On Mon, Oct 07, 2013 at 12:13:18AM +0100, Michael Foord wrote: Wing is only a good example of PyGtk until Wing 5 is out of beta. They too have switched to PyQt... Perhaps Gramps is a good example: http://www.gramps-project.org/ I just glanced at their code and it's still using PyGtk. --amk

Re: [Python-Dev] PEP 451: ModuleSpec

2013-10-07 Thread Eric Snow
On Sat, Oct 5, 2013 at 1:25 AM, Stefan Behnel stefan...@behnel.de wrote: As a quick remark, reading the word name made me think a couple of times whether it's the simple name of the module or the fully qualified name. I think it's the FQMN in pretty much all cases, but it would be good to make

Re: [Python-Dev] [Python-checkins] cpython (3.3): PythonCAD is now on PyQt, use Wing as a prominent PyGtk example.

2013-10-07 Thread Serhiy Storchaka
07.10.13 16:54, A.M. Kuchling написав(ла): On Mon, Oct 07, 2013 at 12:13:18AM +0100, Michael Foord wrote: Wing is only a good example of PyGtk until Wing 5 is out of beta. They too have switched to PyQt... Perhaps Gramps is a good example: http://www.gramps-project.org/ I just glanced at

Re: [Python-Dev] PEP 455: TransformDict

2013-10-07 Thread Russell E. Owen
In article c4c036b6-130c-4718-beb1-a7c923008...@gmail.com, Raymond Hettinger raymond.hettin...@gmail.com wrote: On Sep 22, 2013, at 6:16 PM, Ethan Furman et...@stoneleaf.us wrote: Are we close to asking for pronouncement? When you're ready, let me know. In the meantime, I conducting

Re: [Python-Dev] PEP 455: TransformDict

2013-10-07 Thread Ryan Gonzalez
100% disagreement. Err, well, 50%. A property of existing dictionaries is useless. A separate object in, say, collections is more organized. 3rd party libraries can be hard to find, even the great ones. On Mon, Oct 7, 2013 at 3:01 PM, Russell E. Owen ro...@uw.edu wrote: In article

Re: [Python-Dev] PEP 455: TransformDict

2013-10-07 Thread Steven D'Aprano
On Fri, Oct 04, 2013 at 11:06:15PM +0200, Victor Stinner wrote: (If we cannot find a better name, we may add more specialized classes: KeyInsensitiveDict and IdentiyDict. But I like the idea of using my own transform function.) -1 on a plethora of specialised dicts. I do think that a

Re: [Python-Dev] PEP 455: TransformDict

2013-10-07 Thread Nick Coghlan
On 8 Oct 2013 07:26, Steven D'Aprano st...@pearwood.info wrote: On Fri, Oct 04, 2013 at 11:06:15PM +0200, Victor Stinner wrote: (If we cannot find a better name, we may add more specialized classes: KeyInsensitiveDict and IdentiyDict. But I like the idea of using my own transform

Re: [Python-Dev] PEP 455: TransformDict

2013-10-07 Thread Ethan Furman
On 10/07/2013 02:24 PM, Steven D'Aprano wrote: On Fri, Oct 04, 2013 at 11:06:15PM +0200, Victor Stinner wrote: if type(self) is not dict: # This only applies to subclasses, not dict itself. try: transform = type(self).__transform__ except AttributeError: pass

Re: [Python-Dev] PEP 455: TransformDict

2013-10-07 Thread Steven D'Aprano
On Mon, Oct 07, 2013 at 02:55:44PM -0700, Ethan Furman wrote: On 10/07/2013 02:24 PM, Steven D'Aprano wrote: On Fri, Oct 04, 2013 at 11:06:15PM +0200, Victor Stinner wrote: if type(self) is not dict: # This only applies to subclasses, not dict itself. try: transform =

Re: [Python-Dev] PEP 455: TransformDict

2013-10-07 Thread Ethan Furman
On 10/07/2013 02:55 PM, Ethan Furman wrote: A key difference (pun unavoidable ;) between __missing__ and __transform__ is that __missing__ is only called when a key is not found, while __transform__ needs to be called /every/ time a key is looked up: d[k] d.get(k) d.has_key(k)

Re: [Python-Dev] PEP 455: TransformDict

2013-10-07 Thread Mark Janssen
Sorry I missed the original discussion, but isn't this a simple case of putting a decorator around the getitem method (to transform the input key) and a single line in the body of the setitem method, making this very easy adaptation of the existing dict class? Mark

Re: [Python-Dev] PEP 455: TransformDict

2013-10-07 Thread Steven D'Aprano
On Mon, Oct 07, 2013 at 06:17:09PM -0700, Mark Janssen wrote: Sorry I missed the original discussion, but isn't this a simple case of putting a decorator around the getitem method (to transform the input key) and a single line in the body of the setitem method, making this very easy adaptation