Movatterモバイル変換
[0]ホーム
[Python-Dev] Re: Sets: elt in dict, lst.include
M.-A. Lemburgmal@lemburg.com
Mon, 29 Jan 2001 20:03:41 +0100
With all this confusion about how to actually write theiteration on dictionary items, wouldn't it make more senseto implement an extension module which then provides a __getitem__style iterator for dictionaries by interfacing to PyDict_Next() ?The module could have three different iterators:1. iterate over items2. ... over keys3. ... over valuesThe reasoning behind this is that the __getitem__ interfaceis well established and this doesn't introduce any newsyntax while still providing speed and flexibility.-- Marc-Andre Lemburg______________________________________________________________________Company:http://www.egenix.com/Consulting:http://www.lemburg.com/Python Pages:http://www.lemburg.com/python/
[8]ページ先頭