lists of variables

Ben Finney ben+python at benfinney.id.au
Sat Feb 20 23:09:11 EST 2010


Michael Pardee <python-list at open-sense.com> writes:

> But what would be "the python way" to accomplish "list of variables"
> functionality?

You'll need to explain what “list of variables” functionality is.

If you mean “collection of name-to-value mappings”, the native mapping
type in Python is ‘dict’. If that doesn't meet your needs, you'll need
to be more specific about what behaviour you want.

-- 
 \        “Most people don't realize that large pieces of coral, which |
  `\       have been painted brown and attached to the skull by common |
_o__)    wood screws, can make a child look like a deer.” —Jack Handey |
Ben Finney



More information about the Python-list mailing list