Using dictionary to hold regex patterns?
MRAB
google at mrabarnett.plus.com
Sun Nov 23 18:18:06 EST 2008
More information about the Python-list mailing list
Sun Nov 23 18:18:06 EST 2008
- Previous message (by thread): Using dictionary to hold regex patterns?
- Next message (by thread): Using dictionary to hold regex patterns?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Gilles Ganault wrote: > On Sun, 23 Nov 2008 17:55:48 +0000, Arnaud Delobelle > <arnodel at googlemail.com> wrote: >> But there is no reason why you should use a dictionary; just use a list >> of key-value pairs: > > Thanks for the tip. I didn't know it was possible to use arrays to > hold more than one value. Actually, it's a better solution, as > key/value tuples in a dictionary aren't used in the order in which > they're put in the dictionary, while arrays are. > [snip] A list is an ordered collection of items. Each item can be anything: a string, an integer, a dictionary, a tuple, a list...
- Previous message (by thread): Using dictionary to hold regex patterns?
- Next message (by thread): Using dictionary to hold regex patterns?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list