This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients lemburg, ncoghlan, tleeuwenburg
Date 2011-08-22.12:36:20
SpamBayes Score 4.303169e-12
Marked as misclassified No
Message-id <4E524D42.3020304@egenix.com>
In-reply-to <1314007953.35.0.801322994245.issue12808@psf.upfronthosting.co.za>
Content
Tennessee Leeuwenburg wrote:
> 
> Tennessee Leeuwenburg <tleeuwenburg@gmail.com> added the comment:
> 
> Some more tests, updated initial state of BufferedIncrementalEncoder to be the correct type, updated rst file. Bit tired, hope I got it right!
> 
> Thanks for the feedback everyone, helps me to get it done, even if it's more work for you...

I think you should simply drop this whole part:

"""
The implementation should make sure that ``0`` is the most common state. (States
that are more complicated than integers can be converted into an integer by
marshaling/pickling the state and encoding the bytes of the resulting string
into an integer).
"""

or, better, rephrase it so that it becomes clear that the codec
implementation may use any type of pickleable object to represent
the internal state. The only requirement is that .setstate()
has to be able to read back the state returned by .getstate().

We have codecs in the stdlib that return integers, bytes/string
and even tuples (see the io module and the UTF-16 codec as example),
so the documentation is clearly wrong.

Thanks,
-- 
Marc-Andre Lemburg
eGenix.com

________________________________________________________________________
2011-10-04: PyCon DE 2011, Leipzig, Germany                43 days to go

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/
History
Date User Action Args
2011-08-22 12:36:21lemburgsetrecipients: + lemburg, ncoghlan, tleeuwenburg
2011-08-22 12:36:20lemburglinkissue12808 messages
2011-08-22 12:36:20lemburgcreate