[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