[Python-Dev] string representation of range in 3.0
Brad Miller
bonelake at gmail.com
Thu Apr 17 03:57:32 CEST 2008
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 <lists at cheimes.de>
> 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 at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/bonelake%40gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-dev/attachments/20080416/58f0230b/attachment-0001.htm
More information about the Python-Dev
mailing list