[Barry] > Rationale > > There are times when you have some data arranged as a sequences of > length-2 sequences, and you want to turn that into a dictionary. > In Python 2.2, the dictionary() constructor will take an optional > keyword argument that indicates specifically to interpret a > sequences of length-2 sequences as key/value pairs, and turn them > into a dictionary. This is implemented now, but in a different way. Suggested rewording: In Python 2.2, the dictionary() constructor accepts an argument that is a sequence of length-2 sequences, used as (key, value) pairs to initialize a new dictionary object. BTW, and not meaning to hijack your PEP <wink>, should dict.update() accept such an argument too? I didn't add it because d.update(dictionary(such_an_argument)) seemed "almost good enough". BTW2, are we going to rename "dictionary" to "dict" before 2.2b2? Before 2.2, "dict" was universally used on c.l.py to mean dictionary, and I'm at least +0 on adopting that for official 2.2 use.
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