Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7ebb92e

Browse files
committed
Marc-Andre Lemburg <[email protected]>:
Removed import of string module -- use string methods directly. Thanks to Finn Bock.
1 parent 6b14eeb commit 7ebb92e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/encodings/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
2828
"""#"
2929

30-
import string,codecs,aliases
30+
import codecs,aliases
3131

3232
_cache = {}
3333
_unknown = '--unknown--'
@@ -40,7 +40,7 @@ def search_function(encoding):
4040
return entry
4141

4242
# Import the module
43-
modname = string.replace(encoding, '-', '_')
43+
modname = encoding.replace('-', '_')
4444
modname = aliases.aliases.get(modname,modname)
4545
try:
4646
mod = __import__(modname,globals(),locals(),'*')

0 commit comments

Comments
 (0)