diff options
author | Marc-André Lemburg <mal@egenix.com> | 2000-06-13 12:04:05 (GMT) |
---|---|---|
committer | Marc-André Lemburg <mal@egenix.com> | 2000-06-13 12:04:05 (GMT) |
commit | 7ebb92ea668d32001576577b4982a32ac8f55ff1 (patch) | |
tree | 5d247cd5139ec9a63796a2e705eb67da120efe93 | |
parent | 6b14eebae680fb5a1bd14aa27cbd73ec6059303b (diff) | |
download | cpython-7ebb92ea668d32001576577b4982a32ac8f55ff1.zip cpython-7ebb92ea668d32001576577b4982a32ac8f55ff1.tar.gz cpython-7ebb92ea668d32001576577b4982a32ac8f55ff1.tar.bz2 |
Marc-Andre Lemburg <mal@lemburg.com>:
Removed import of string module -- use string methods directly.
Thanks to Finn Bock.
-rw-r--r-- | Lib/encodings/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/encodings/__init__.py b/Lib/encodings/__init__.py index fa3119a..8df9020 100644 --- a/Lib/encodings/__init__.py +++ b/Lib/encodings/__init__.py @@ -27,7 +27,7 @@ Written by Marc-Andre Lemburg (mal@lemburg.com). """#" -import string,codecs,aliases +import codecs,aliases _cache = {} _unknown = '--unknown--' @@ -40,7 +40,7 @@ def search_function(encoding): return entry # Import the module - modname = string.replace(encoding, '-', '_') + modname = encoding.replace('-', '_') modname = aliases.aliases.get(modname,modname) try: mod = __import__(modname,globals(),locals(),'*') |