mirror of
https://github.com/python/cpython.git
synced 2025-08-29 13:15:11 +00:00
Misc changes and new modules. whrandom is "objectified". SOCKET.py
is moved to the sgi subdirectory.
This commit is contained in:
parent
0cb8e8cfc0
commit
2db91358de
10 changed files with 778 additions and 46 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue