[Python-3000] Iterators for dict keys, values, and items == annoying :)

Jim Fulton jim at zope.com
Thu Mar 23 21:57:09 CET 2006


Guido van Rossum wrote:
...
> I've read and re-read Jim's message, and I'm not sure I understand it.
> It seems he's working in an interactive session

Yup

 > but I'm not sure I
> understand the problem he has with adding list() around an expression

It's a hassle.

> (unless he hasn't got readline, in which case he's got worse
> problems).

Nope.  I've got readline or the emacs shell equivalent.

 > IMO the feature he asks for getting a list back already
> exists is adding list() around the expression.

That and the fact that I almost always type:

   foo.keys()

and then get something useless and *then*, say "Doh!"
and then have to add the list call.

This is a case where I can give feedback based on actual
experience with a feature.  It's like you get user testing
for free. :)

I'd be interested to hear if other people who have experience working
with ZODB BTrees have been as annoyed as I've been.

Then again, I suspect that when you actually implement this
you or perhaps other will be as annoyed with this feature as
I am.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Python-3000 mailing list