python implementation of a new integer encoding algorithm.

Mark Lawrence breamoreboy at yahoo.co.uk
Wed Feb 18 13:12:43 EST 2015


On 18/02/2015 17:30, Grant Edwards wrote:
> On 2015-02-18, Dave Angel <davea at davea.name> wrote:
>> On 02/18/2015 03:59 AM, janhein.vanderburg at gmail.com wrote:
>>
>>
>>> encoding individual integers optimally without any assumptions about
>>> their values.
>>
>> Contradiction in terms.
>
> Ah, that depends on whether the encoding has to be lossless or not.
>
> For example:
>
>    def encode_integer(i):
>      return 0;
>
> Voila! Optimal encoding with no assumptions about intut values.
>
> It is, however, a bit lossy.
>

Is it this kind of coding that makes the PEP 393 FSR so poor?

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list