From 4c1eaa122eaeae54e30c93e3c230b9b0b88d8cea Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Wed, 3 Jul 2013 04:54:22 +0200 Subject: [PATCH] Changed expandtabs explanation --- strings.html | 2 +- strings.zpy | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/strings.html b/strings.html index 75fd053..9c0fd70 100644 --- a/strings.html +++ b/strings.html @@ -156,6 +156,6 @@ -

Strings

These methods are available on both regular and Unicode strings.
.decode([encoding[, errors]])
Returns a unicode string containing a copy of the original string, decoded using the codec registered for the specified encoding.
Since Python 2.7: You can also specify the arguments to this method as keyword arguments, for clarity.
encoding
Optional. The encoding that the string is currently in. If not specified, the value from sys.getdefaultencoding is used.
errors
Optional. The error handling scheme to use. Can be any of the following values, or any other name that is registered through codecs.register_error.
strict
This is the default. Encoding errors raise a UnicodeError exception, or a subclass thereof.
ignore
When an error is encountered, ignore the character, and move on to the next one.
replace
When an error is encountered, replace the problematic character with U+FFFD, for the built-in Unicode codecs.
.encode([encoding[, errors]])
Returns a regular string containing a copy of the original string, encoded using the codec registered for the specified encoding.
Since Python 2.7: You can also specify the arguments to this method as keyword arguments, for clarity.
encoding
Optional. The encoding you wish to encode the string to. If not specified, the value from sys.getdefaultencoding is used.
errors
Optional. The error handling scheme to use. Can be any of the following values, or any other name that is registered through codecs.register_error.
strict
This is the default. Encoding errors raise a UnicodeError exception, or a subclass thereof.
ignore
When an error is encountered, ignore the character, and move on to the next one.
replace
When an error is encountered, replace the problematic character with U+FFFD, for the built-in Unicode codecs.
xmlcharrefreplace
When an error is encountered, replace the problematic character with the corresponding XML entity.
backslashreplace
When an error is encountered, replace the problematic character with the corresponding backslashed escape sequence.
+

Strings

These methods are available on both regular and Unicode strings.
.decode([encoding[, errors]])
Returns a unicode string containing a copy of the original string, decoded using the codec registered for the specified encoding.
Since Python 2.7: You can also specify the arguments to this method as keyword arguments, for clarity.
encoding
Optional. The encoding that the string is currently in. If not specified, the value from sys.getdefaultencoding is used.
errors
Optional. The error handling scheme to use. Can be any of the following values, or any other name that is registered through codecs.register_error.
strict
This is the default. Encoding errors raise a UnicodeError exception, or a subclass thereof.
ignore
When an error is encountered, ignore the character, and move on to the next one.
replace
When an error is encountered, replace the problematic character with U+FFFD, for the built-in Unicode codecs.
.encode([encoding[, errors]])
Returns a regular string containing a copy of the original string, encoded using the codec registered for the specified encoding.
Since Python 2.7: You can also specify the arguments to this method as keyword arguments, for clarity.
encoding
Optional. The encoding you wish to encode the string to. If not specified, the value from sys.getdefaultencoding is used.
errors
Optional. The error handling scheme to use. Can be any of the following values, or any other name that is registered through codecs.register_error.
strict
This is the default. Encoding errors raise a UnicodeError exception, or a subclass thereof.
ignore
When an error is encountered, ignore the character, and move on to the next one.
replace
When an error is encountered, replace the problematic character with U+FFFD, for the built-in Unicode codecs.
xmlcharrefreplace
When an error is encountered, replace the problematic character with the corresponding XML entity.
backslashreplace
When an error is encountered, replace the problematic character with the corresponding backslashed escape sequence.
diff --git a/strings.zpy b/strings.zpy index 6db95f7..4d999d3 100644 --- a/strings.zpy +++ b/strings.zpy @@ -140,7 +140,9 @@ These methods are available on both regular and Unicode strings. The string is divided up into columns, each of which is as wide as the given tabsize. After every part of the string that is not a tab character, the current column is filled up with one or - more spaces, until the next column 'border' is reached. + more spaces, until the next column 'border' is reached. If there + are multiple tab characters in a row, the remaining tab + characters will fill up an entire column. ! Every character that is not a tab, newline or return, will be treated as being one position wide, even if they are not