mirror of
https://github.com/python/cpython.git
synced 2024-11-30 05:15:14 +08:00
Drop the 'extend()' function -- old 1.5.1 compatibility hack that
wasn't actually used anywhere. Drop the "from xxx_util import*" backwards compability hacks.
This commit is contained in:
parent
ff7b562bc6
commit
5a8aa1ba2e
@ -11,26 +11,6 @@ import sys, os, string, re, shutil
|
||||
from distutils.errors import *
|
||||
from distutils.spawn import spawn
|
||||
|
||||
# for backwards compatibility:
|
||||
from distutils.file_util import *
|
||||
from distutils.dir_util import *
|
||||
from distutils.dep_util import *
|
||||
from distutils.archive_util import *
|
||||
|
||||
|
||||
# More backwards compatibility hacks
|
||||
def extend (list, new_list):
|
||||
"""Appends the list 'new_list' to 'list', just like the 'extend()'
|
||||
list method does in Python 1.5.2 -- but this works on earlier
|
||||
versions of Python too."""
|
||||
|
||||
if hasattr (list, 'extend'):
|
||||
list.extend (new_list)
|
||||
else:
|
||||
list[len(list):] = new_list
|
||||
|
||||
# extend ()
|
||||
|
||||
|
||||
def get_platform ():
|
||||
"""Return a string (suitable for tacking onto directory names) that
|
||||
|
Loading…
Reference in New Issue
Block a user