diff options
| author | Georg Brandl <georg@python.org> | 2009-10-22 15:42:32 (GMT) | 
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2009-10-22 15:42:32 (GMT) | 
| commit | f4ffae2b2a34cc9b43229e83e6d0dc7c2dab12a5 (patch) | |
| tree | 75acefabda2e7a73621e8f537324c00adcb8c229 /Python/codecs.c | |
| parent | 030d65811fad6cc6a2bf5d51860e6defa206df0a (diff) | |
| download | cpython-f4ffae2b2a34cc9b43229e83e6d0dc7c2dab12a5.zip cpython-f4ffae2b2a34cc9b43229e83e6d0dc7c2dab12a5.tar.gz cpython-f4ffae2b2a34cc9b43229e83e6d0dc7c2dab12a5.tar.bz2  | |
#7035: improve docs of the various <method>_errors() functions, and give them docstrings.
Diffstat (limited to 'Python/codecs.c')
| -rw-r--r-- | Python/codecs.c | 22 | 
1 files changed, 17 insertions, 5 deletions
diff --git a/Python/codecs.c b/Python/codecs.c index 4b0f4cb..3849cf9 100644 --- a/Python/codecs.c +++ b/Python/codecs.c @@ -774,7 +774,9 @@ static int _PyCodecRegistry_Init(void)  	    {  		"strict_errors",  		strict_errors, -		METH_O +		METH_O, +		PyDoc_STR("Implements the 'strict' error handling, which " +			  "raises a UnicodeError on coding errors.")  	    }  	},  #ifdef Py_USING_UNICODE @@ -783,7 +785,9 @@ static int _PyCodecRegistry_Init(void)  	    {  		"ignore_errors",  		ignore_errors, -		METH_O +		METH_O, +		PyDoc_STR("Implements the 'ignore' error handling, which " +			  "ignores malformed data and continues.")  	    }  	},  	{ @@ -791,7 +795,9 @@ static int _PyCodecRegistry_Init(void)  	    {  		"replace_errors",  		replace_errors, -		METH_O +		METH_O, +		PyDoc_STR("Implements the 'replace' error handling, which " +			  "replaces malformed data with a replacement marker.")  	    }  	},  	{ @@ -799,7 +805,10 @@ static int _PyCodecRegistry_Init(void)  	    {  		"xmlcharrefreplace_errors",  		xmlcharrefreplace_errors, -		METH_O +		METH_O, +		PyDoc_STR("Implements the 'xmlcharrefreplace' error handling, " +			  "which replaces an unencodable character with the " +			  "appropriate XML character reference.")  	    }  	},  	{ @@ -807,7 +816,10 @@ static int _PyCodecRegistry_Init(void)  	    {  		"backslashreplace_errors",  		backslashreplace_errors, -		METH_O +		METH_O, +		PyDoc_STR("Implements the 'backslashreplace' error handling, " +			  "which replaces an unencodable character with a " +			  "backslashed escape sequence.")  	    }  	}  #endif  | 
