Spreadsheet, a cute Python hack…

Published on 2004-12-03 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.