[Python-checkins] python/nondist/peps pep-0293.txt,1.3,1.4
doerwalter@users.sourceforge.net
doerwalter@users.sourceforge.net
Thu, 25 Jul 2002 06:23:31 -0700
Update of /cvsroot/python/python/nondist/peps
In directory usw-pr-cvs1:/tmp/cvs-serv1734
Modified Files:
pep-0293.txt
Log Message:
Update the PEP to the current state of the patch.
Index: pep-0293.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0293.txt,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** pep-0293.txt 9 Jul 2002 18:35:04 -0000 1.3
--- pep-0293.txt 25 Jul 2002 13:23:29 -0000 1.4
***************
*** 311,315 ****
i.e. (3) is 180 times slower than (1).
! Codecs must be stateless, because as soon as a callback is
registered it is available globally and can be called by multiple
encode() calls. To be able to use stateful callbacks, the errors
--- 311,315 ----
i.e. (3) is 180 times slower than (1).
! Callbacks must be stateless, because as soon as a callback is
registered it is available globally and can be called by multiple
encode() calls. To be able to use stateful callbacks, the errors
***************
*** 350,362 ****
A sample implementation is available as SourceForge patch #432401
! [2]. The current version of this patch differs from the
! specification in the following way:
! * The error information is passed from the codec to the callback
! not as an exception object, but as a tuple, which has an
! additional entry state, which can be used for additional
! information the codec might want to pass to the callback.
! * There are two separate registries (one for
! encoding/translating and one for decoding)
The class codecs.StreamReaderWriter uses the errors parameter for
--- 350,363 ----
A sample implementation is available as SourceForge patch #432401
! [2] including a script for testing the speed of various
! string/encoding/error combinations and a test script.
! Currently the new exception classes are old style Python
! classes. This means that accessing attributes results
! in a dict lookup. The C API is implemented in a way
! that makes it possible to switch to new style classes
! behind the scene, if Exception (and UnicodeError) will
! be changed to new style classes implemented in C for
! improved performance.
The class codecs.StreamReaderWriter uses the errors parameter for