On Feb 26, 11:15 am, mrstephengross <[EMAIL PROTECTED]> wrote: > > How about this? > > d = dict(tuples) > > Aha! I hadn't realized it could be so simple. > > --Steve
In terms of a metric for code, 'And runs in a single line!' may be a bit deceptive. [Counterexample snipped.] Absent repeating the line d= dict( tuples ) verbatim, how does: identifiers: 3 - func. calls: 1 -- builtins: 1 -- call depth: 1 - assign't: 1 - variable: 1 nesting depth: 1 - parenthesis: 1 - control flow: 0 if statements: 0 - elifs: 0 - elses: 0 call tree: 0 - max. breadth: 1 -- per scope: 1 - max. depth: 1 -- per scope: 1 sound? -- http://mail.python.org/mailman/listinfo/python-list