Re: Most pythonic way to implement byte stuffing algorithm

2018-04-17 Thread Travis Griggs
> On Apr 17, 2018, at 11:15 AM, MRAB wrote: > > On 2018-04-17 17:02, Travis Griggs wrote: >> I posted this on SO, but… yeah… >> I'm doing some serial protocol stuff and want to implement a basic byte >> stuffing algorithm in python. Though really what this really generalizes to >> is “what is

Re: Most pythonic way to implement byte stuffing algorithm

2018-04-17 Thread MRAB
On 2018-04-17 17:02, Travis Griggs wrote: I posted this on SO, but… yeah… I'm doing some serial protocol stuff and want to implement a basic byte stuffing algorithm in python. Though really what this really generalizes to is “what is the most pythonic way to transform one sequence of bytes whe

Re: Most pythonic way to implement byte stuffing algorithm

2018-04-17 Thread Grant Edwards
On 2018-04-17, Travis Griggs wrote: > I posted this on SO, but… yeah… > > I'm doing some serial protocol stuff and want to implement a basic > byte stuffing algorithm in python. Though really what this really > generalizes to is “what is the most pythonic way to transform one > sequence of bytes

Most pythonic way to implement byte stuffing algorithm

2018-04-17 Thread Travis Griggs
I posted this on SO, but… yeah… I'm doing some serial protocol stuff and want to implement a basic byte stuffing algorithm in python. Though really what this really generalizes to is “what is the most pythonic way to transform one sequence of bytes where some bytes are passed through 1:1, but