cpython/Include
Marc-André Lemburg 2d9204199f This patch changes the way the string .encode() method works slightly
and introduces a new method .decode().

The major change is that strg.encode() will no longer try to convert
Unicode returns from the codec into a string, but instead pass along
the Unicode object as-is. The same is now true for all other codec
return types. The underlying C APIs were changed accordingly.

Note that even though this does have the potential of breaking
existing code, the chances are low since conversion from Unicode
previously took place using the default encoding which is normally
set to ASCII rendering this auto-conversion mechanism useless for
most Unicode encodings.

The good news is that you can now use .encode() and .decode() with
much greater ease and that the door was opened for better accessibility
of the builtin codecs.

As demonstration of the new feature, the patch includes a few new
codecs which allow string to string encoding and decoding (rot13,
hex, zip, uu, base64).

Written by Marc-Andre Lemburg. Copyright assigned to the PSF.
2001-05-15 12:00:02 +00:00
..
Python.h Iterators phase 1. This comprises: 2001-04-20 19:13:02 +00:00
abstract.h Reimplement PySequence_Contains() and instance_contains(), so they work 2001-05-05 21:05:01 +00:00
bitset.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
bufferobject.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
cStringIO.h Miscelaneous ANSIfications. I'm assuming here 'main' should take (int, 2000-07-22 19:25:51 +00:00
cellobject.h PEP 227 implementation 2001-01-25 20:04:14 +00:00
ceval.h If a code object is compiled with nested scopes, define the CO_NESTED flag. 2001-03-22 02:32:48 +00:00
classobject.h Add the necessary field for weak reference support to the function and 2001-03-23 04:17:58 +00:00
cobject.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
codecs.h Changing the CNRI copyright notice according to CNRI's instructions. 2000-08-03 16:24:25 +00:00
compile.h If a code object is compiled with nested scopes, define the CO_NESTED flag. 2001-03-22 02:32:48 +00:00
complexobject.h ANSI-fication and Py_PROTO extermination. 2000-07-09 00:20:36 +00:00
config.h all: 1994 copyright 1994-01-02 00:11:39 +00:00
dictobject.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
errcode.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
eval.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
fileobject.h Fix the Py_FileSystemDefaultEncoding checkin - declare the variable in a fileobject.h, and initialize it in bltinmodule. 2001-05-14 12:17:34 +00:00
floatobject.h SF bug #422177: Results from .pyc differs from .py 2001-05-08 15:19:57 +00:00
frameobject.h Variety of small INC/DECREF patches that fix reported memory leaks 2001-03-13 01:58:22 +00:00
funcobject.h Add the necessary field for weak reference support to the function and 2001-03-23 04:17:58 +00:00
graminit.h The real suport for augmented assignment: new opcodes, new PyNumber and 2000-08-24 20:09:45 +00:00
grammar.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
import.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
intobject.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
intrcheck.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
iterobject.h Mondo changes to the iterator stuff, without changing how Python code 2001-04-23 14:08:49 +00:00
listobject.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
longintrepr.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
longobject.h Rationalize use of limits.h, moving the inclusion to Python.h. 2000-09-26 05:46:01 +00:00
marshal.h It's unclear whether PyMarshal_XXX() are part of the public or private API. 2001-01-28 00:27:39 +00:00
metagrammar.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
methodobject.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
modsupport.h The addition of new parameters to functions in the Python/C API requires 2001-01-25 22:13:34 +00:00
moduleobject.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
node.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
object.h Mondo changes to the iterator stuff, without changing how Python code 2001-04-23 14:08:49 +00:00
objimpl.h A small change to the C API for weakly-referencable types: Such types 2001-03-22 18:26:47 +00:00
opcode.h Iterators phase 1. This comprises: 2001-04-20 19:13:02 +00:00
osdefs.h RISCOS patch by dschwertberger 2001-03-02 06:10:17 +00:00
parsetok.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
patchlevel.h Change the version to 2.2a0. This may look strange, but indicates 2001-04-18 04:31:01 +00:00
pgenheaders.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
py_curses.h Added header file for C API exported by _cursesmodule.c 2000-12-22 21:51:10 +00:00
pydebug.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
pyerrors.h Iterators phase 1. This comprises: 2001-04-20 19:13:02 +00:00
pyfpe.h Some patches to Lee Busby's fpectl mods that accidentally didn't make it 1997-10-20 23:50:01 +00:00
pygetopt.h Move our own getopt() implementation to _PyOS_GetOpt(), and use it 2000-11-03 08:18:37 +00:00
pymem.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
pyport.h SF patch #418147 Fixes to allow compiling w/ Borland, from Stephen Hansen. 2001-05-14 22:32:33 +00:00
pystate.h Add a new API, PyThreadState_DeleteCurrent() that combines 2001-01-23 01:46:06 +00:00
pythonrun.h Add sys.excepthook. 2001-03-23 02:46:52 +00:00
pythread.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
rangeobject.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
rename1.h __builtins__ mods (and sys_checkinterval for ceval.c) 1995-01-09 17:53:26 +00:00
sliceobject.h ANSI-fication and Py_PROTO extermination. 2000-07-09 00:55:06 +00:00
stringobject.h This patch changes the way the string .encode() method works slightly 2001-05-15 12:00:02 +00:00
structmember.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
symtable.h Set the line number correctly for a nested function with an exec or 2001-03-22 03:57:58 +00:00
sysmodule.h Add declarations for PySys_ResetWarnOptions() and 2000-12-15 22:01:39 +00:00
token.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
traceback.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
tupleobject.h REMOVED all CWI, CNRI and BeOpen copyright markings. 2000-09-01 23:29:29 +00:00
ucnhash.h refactored the unicodeobject/ucnhash interface, to hide the 2001-01-19 09:45:02 +00:00
unicodeobject.h This patch originated from an idea by Martin v. Loewis who submitted a 2001-04-23 14:44:21 +00:00