On Nov 24, 7:49 am, Thomas Mlynarczyk <[EMAIL PROTECTED]>
wrote:
> John Machin schrieb:
>
> > General tip: Don't us a data structure that is more complicated than
> > what you need.
>
> Is "[ ( name, regex ), ... ]" really "simpler" than "{ name: regex, ...}"?
> Intuitively, I would consider the dictionary to be the simpler
>
> structure.
Hi Thomas,
Rephrasing for clarity: Don't use a data structure that is more
complicated than that indicated by your requirements.
Judging which of two structures is "simpler" should not be independent
of those requirements. I don't see a role for intuition in this
process.
Please see my belated response in your "My first Python program -- a
lexer" thread.
Cheers,
John
--
http://mail.python.org/mailman/listinfo/python-list