A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2001-June/015295.html below:

could int, str, tuple etc. become type objects?

[Python-Dev] quick poll: could int, str, tuple etc. become type objects?Jack Jansen jack@oratrix.nl
Wed, 06 Jun 2001 13:39:56 +0200
For the dictionary initializer I would definitely want to be able to give an 
object that adheres to the dictionary protocol, so that I can to things like

import anydbm
f = anydbm.open("foo", "r")
incore = dict(f)

Hmm, I guess this goes for most types: list() and tuple() should take any 
iterable object, etc.

The one question is what "dictionary protocol" mean. Should it support 
items()? Is only x.keys()/x[] good enough?
--
Jack Jansen             | ++++ stop the execution of Mumia Abu-Jamal ++++
Jack.Jansen@oratrix.com | ++++ if you agree copy these lines to your sig ++++
www.oratrix.nl/~jack    | see http://www.xs4all.nl/~tank/spg-l/sigaction.htm 





RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4