Misc changes and new modules. whrandom is "objectified". SOCKET.py

is moved to the sgi subdirectory.
This commit is contained in:
Guido van Rossum 1992-10-18 17:09:59 +00:00
parent 0cb8e8cfc0
commit 2db91358de
10 changed files with 778 additions and 46 deletions

View file

@ -163,3 +163,15 @@ def expandtabs(s, tabsize):
res = res + line
line = ''
return res + line
# Try importing optional built-in module "strop" -- if it exists,
# it redefines some string operations that are 100-1000 times faster.
# The manipulation with index_error is needed for compatibility.
try:
from strop import *
from strop import index
index_error = ValueError
except ImportError:
pass # Use the original, slow versions