Re: constucting a lookup table

2006-05-17 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: > BTW, just for kicks to compare languages, how would one implement the > same "lookup" table using C/C++? It would be a good lesson in high > level vs. lower level programming > Something vaguely like: unsigned char hwdict[89 - 60][401 - 80]; int setsize(int height

Re: constucting a lookup table

2006-05-17 Thread mhodkin
BTW, just for kicks to compare languages, how would one implement the same "lookup" table using C/C++? It would be a good lesson in high level vs. lower level programming -- http://mail.python.org/mailman/listinfo/python-list

Re: constucting a lookup table

2006-05-16 Thread mhodkin
Larry Bates wrote: > [EMAIL PROTECTED] wrote: > > I'm new to Python and want to contruct a "lookup table" which would be > > similar to a spreadsheet in that a value is read along the first > > column, then along the top row, and the intersection of the two gives a > > value that is hard-coded, i.

Re: constucting a lookup table

2006-05-16 Thread Larry Bates
[EMAIL PROTECTED] wrote: > I'm new to Python and want to contruct a "lookup table" which would be > similar to a spreadsheet in that a value is read along the first > column, then along the top row, and the intersection of the two gives a > value that is hard-coded, i.e. not mathmatically related.

Re: constucting a lookup table

2006-05-16 Thread johnzenger
How about a dictionary, keyed on tuples of (height, weight)? [EMAIL PROTECTED] wrote: > I'm new to Python and want to contruct a "lookup table" which would be > similar to a spreadsheet in that a value is read along the first > column, then along the top row, and the intersection of the two gives

constucting a lookup table

2006-05-16 Thread mhodkin
I'm new to Python and want to contruct a "lookup table" which would be similar to a spreadsheet in that a value is read along the first column, then along the top row, and the intersection of the two gives a value that is hard-coded, i.e. not mathmatically related. An example would be a table with