Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: PEP8 79 char max Date: Thu, 1 Aug 2013 19:53:26 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 31 Message-ID: References: <51F6C5F5.5020201@Gmail.com> <51f6e1d8$0$30000$c3e8da3$5496439d@news.astraweb.com> <51F6ED13.5010508@Gmail.com> NNTP-Posting-Host: dsl.comtrol.com X-Trace: reader1.panix.com 1375386806 13270 64.122.56.22 (1 Aug 2013 19:53:26 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Thu, 1 Aug 2013 19:53:26 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) Xref: csiph.com comp.lang.python:51762 On 2013-08-01, Grant Edwards wrote: > On 2013-08-01, Joshua Landau wrote: >> On 31 July 2013 17:32, Grant Edwards wrote: >> >>> On 2013-07-31, Tim Chase wrote: >>> > On 2013-07-31 07:16, Joshua Landau wrote: >>> >> On 30 July 2013 18:52, Grant Edwards wrote: >>> >>> I also find intializers for tables of data to be much more easily >>> >>> read and maintained if the columns can be aligned. >>> >> >>> >> Why do you have tables in your Python code? >>> >>> For example: if you're writing an assembler, you usually have a table >>> of mnemonics/opcodes/instruction-format/addressing-modes. >> >> Why are you writing an assembler? > > I got tired of hand assembling (and disassembling) code for a custom > microprocessor, so I wrote an assembler and a disassembler. FWIW, 250 lines of Python gets you a pretty decent 2-pass absolute assembler with full arithmetic expression support (including user-defined symbols). That 250 lines includes the "table" that defines the individual instructions. And yes, the columns in that table are aligned using spaces. ;) -- Grant Edwards grant.b.edwards Yow! I just had a NOSE at JOB!! gmail.com