T. Joseph Carter a496c6bc0f Reformat arg parsing, add sli() function
Python's native sequence slicing method calls for start with optional
stop and step.  This is sometimes exactly what you want, but especially
when parsing binary files, you're gonna want start/length instead.  If
start was an expression, messy.

In cppo, there's a function slyce that returns a sliced sequence using
start/length/step metrics, and this is used exclusively for slicing
sequences.  Except sometimes you really want Python's start/stop...

I figure: Let's do it Python's way with the slicing syntax, but instead
of seq[start:start+length], you can use sli(): seq[sli(start,length)].
It's not currently used that way, but it now can be.  :)
2017-06-21 06:20:46 -07:00
2017-06-21 06:20:46 -07:00
Description
Rewriting cppo one piece at a time
153 KiB
Languages
Python 100%