On 2013-07-31, Neil Cerutti <ne...@norwich.edu> wrote: > On 2013-07-31, Grant Edwards <invalid@invalid.invalid> wrote: >> On 2013-07-31, Neil Cerutti <ne...@norwich.edu> wrote: >>> Besides, after studying The Pragmatic Programmer I removed >>> nearly all the tables from my code and reference them (usually >>> with csv module) instead. >> >> I don't understand. That just moves them to a different file >> -- doesn't it? You've still got to deal with editing a large >> table of data (for example when I want to add instructions to >> your assembler). > > Yes, but it is much easier to manipulate and view. I often still > edit the tables with Vim, but when I just want to view them I can > open them with Excel and get a very attractive display or > printout with minimal effort.
If you're good at Excel. I use a spreadsheet at most a few times a year, and it has been many years since I've used Excel. I find that doing _anything_ with Excel generally involves at least an hour of hairpulling and swearing. Libreoffice isn't much better. > If it turns out I need to convert the table to some new format, > tools are abundant. True. > A couple of big wins: > > It turned out later that some other entity needed the same data. It would save the two seconds it takes to extract the lines from the Python file. > It has allowed me to add functionality to my program without even > editing the program. Now you're playing with semantics. If I have a bunch of lines containing values separated by commas, and I'm editting them, then it makes no difference to me which file they're in -- I'm still adding functionality be editing a table of data. > Wouldn't be cool to add a new instruction by to my assembler, > including documentation, merely by editing a csv file? (I admit > that would need quite a bit of engineering to work, but it would > be cool.) Yes, that's cool, and that's pretty much how it works. Those csv lines just happen to be in the same file as the rest of the assembler source rather than in a second file. -- Grant Edwards grant.b.edwards Yow! Hello? Enema Bondage? at I'm calling because I want gmail.com to be happy, I guess ... -- http://mail.python.org/mailman/listinfo/python-list