[Python-3000] Ordered mapping type for Python 3000? (original) (raw)
BJörn Lindqvist bjourne at gmail.com
Wed Mar 28 10:51:28 CEST 2007
- Previous message: [Python-3000] Ordered mapping type for Python 3000?
- Next message: [Python-3000] Ordered mapping type for Python 3000?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 3/28/07, Josiah Carlson <jcarlson at uci.edu> wrote:
"BJörn Lindqvist" <bjourne at gmail.com> wrote: > col = attrtuple(r = 255, g = 0, b = 128) > r, g, b = col That is handled reasonably well with Raymond's recipe (or variants thereof).
Well, no. NamedTuple('Color', 'r g b')(r = 255, g = 0, b = 128) is not at all the same thing.
> el = makeel('input', type = 'text', class = 'query')
XML elements are not ordering sensitive.
Except when you write them. If you want the output to be exactly you must have an order.
> Or interface easier with tabular, order-dependent data.
That is handled with the ordered dictionary and metaclass sytax PEP.
Yes. Making **kwargs orderable would merely be the syntactic support that would make ordered dictionaries a breeze to work with.
-- mvh Björn
- Previous message: [Python-3000] Ordered mapping type for Python 3000?
- Next message: [Python-3000] Ordered mapping type for Python 3000?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]