[Python-3000] Discussions with no PEPs

Phillip J. Eby pje at telecommunity.com
Tue Mar 13 04:36:03 CET 2007


At 08:48 PM 3/12/2007 -0600, Steven Bethard wrote:
>On 3/12/07, Phillip J. Eby <pje at telecommunity.com> wrote:
> > For maybe 80-90% of the purposes that I originally created PyProtocols for,
> > I have found that "simplegeneric" (
> > http://cheeseshop.python.org/simplegeneric/ ) is more than adequate -- and
> > it's only 80 lines of code.
>
>I believe the correct URL is:
>     http://cheeseshop.python.org/pypi/simplegeneric/

Oops.


> > Of course, generic functions require you to say 'foo(bar)' instead of
> > 'bar.foo()' (and IIUC, that's the big sticking point for Guido wrt to GF's
> > in Py3K).
>
>Yeah, I'd be happy to see things like ``len()`` and ``iter()`` become
>generic functions like these (they're already most of the way there)
>but I'm not sure I'm ready to start writing ``dict.update(d, ...)``
>instead of ``d.update(...)``.

If you *know* you're using a dict, then of course d.update() is 
preferable.  But wouldn't it be *nice* if you *could* call dict.update(d, 
...) on anything that had a __setitem__?   :)



More information about the Python-3000 mailing list