Spreadsheet, a cute Python hack…

December 3, 2004 | Python | By: Mark VandeWettering

The Python Cookbook has a new entry which I thought was especially clever, and perhaps the only really good use of eval that I’ve ever seen. It is a class which simulates a spreadsheet. It is clever because it uses a class which simulates a dictionary as an environment in which to evaluate expressions. Quite clever, and very short.