mirror of
https://github.com/iKarith/cppo-ng.git
synced 2025-02-19 07:31:36 +00:00
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. :)
Description
Languages
Python
100%