I worked up prototype implementation for dict_keys, dict_values, and dict_items

Here's an example of what the output looks like:

>>> x = {chr(i):i for i in range(68,90)}
>>> x.keys()
<dict_keys object 'E', 'D', 'G', ...>
>>> x.values()
<dict_values object 69, 68, 71, ...>
>>> x.items()
<dict_items object ('E', 69), ('D', 68), ('G', 71), ...>
>>>

comments?

Are there other objects in this family that I should look at?

Brad

On Apr 16, 2008, at 5:30 PM, Guido van Rossum wrote:

No, tp_print is dead, unless I am terribly mistaken. (We didn't remove
the slot because that would require updating every single static type
initializer.)

On Wed, Apr 16, 2008 at 2:39 PM, Christian Heimes <[EMAIL PROTECTED]> wrote:
Guido van Rossum schrieb:

Why only str()? Note that the interactive prompt uses repr() to display values.

Does py3k still use the tp_print slot for the interactive prompt?

--
--Guido van Rossum (home page: http://www.python.org/~guido/)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/bonelake%40gmail.com

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to