> How about two dictionaries, each containing the same tuples for
> values? If you create a tuple first, then add it to both dicts, you
> won't have any space-wasting duplicates.
Thanks guys.
--
https://mail.python.org/mailman/listinfo/python-list
On Mon, 18 Nov 2013 02:03:38 +, "Joseph L. Casale"
wrote:
I have a need for a script to hold several tuples with three
values, two text
strings and a lambda. I need to index the tuple based on either of
the two
strings. Normally a database would be ideal but for a
self-contained script
> Not entirely sure I understand you, can you post an example?
>
> If what you mean is that you need to locate the function (lambda) when
> you know its corresponding strings, a dict will suit you just fine.
> Either maintain two dicts for the two separate strings (eg if they're
> "name" and "loca
On Sunday, November 17, 2013 9:03:38 PM UTC-5, Joseph L. Casale wrote:
> I have a need for a script to hold several tuples with three values, two text
> strings and a lambda. I need to index the tuple based on either of the two
> strings. Normally a database would be ideal but for a self-contained
On Mon, Nov 18, 2013 at 1:03 PM, Joseph L. Casale
wrote:
> I have a need for a script to hold several tuples with three values, two text
> strings and a lambda. I need to index the tuple based on either of the two
> strings. Normally a database would be ideal but for a self-contained script
> that
On 2013-11-18 02:03, Joseph L. Casale wrote:
> I have a need for a script to hold several tuples with three
> values, two text strings and a lambda. I need to index the tuple
> based on either of the two strings. Normally a database would be
> ideal but for a self-contained script that's a bit much