SF patch 568629 by Oren Tirosh: types made callable.

These built-in functions are replaced by their (now callable) type:

    slice()
    buffer()

and these types can also be called (but have no built-in named
function named after them)

    classobj (type name used to be "class")
    code
    function
    instance
    instancemethod (type name used to be "instance method")

The module "new" has been replaced with a small backward compatibility
placeholder in Python.

A large portion of the patch simply removes the new module from
various platform-specific build recipes.  The following binary Mac
project files still have references to it:

    Mac/Build/PythonCore.mcp
    Mac/Build/PythonStandSmall.mcp
    Mac/Build/PythonStandalone.mcp

[I've tweaked the code layout and the doc strings here and there, and
added a comment to types.py about StringTypes vs. basestring.  --Guido]
This commit is contained in:
Guido van Rossum 2002-06-14 20:41:17 +00:00
parent 57454e57f8
commit bea18ccde6
17 changed files with 287 additions and 130 deletions

View file

@ -264,9 +264,6 @@ $(LIB_PYTHON): $(OBJECTS)
$(LINK) -aof -o @.^.Modules.o.md5link @.^.Modules.o.md5c @.^.Modules.o.md5module
$(MAKEDLK) -d @.^.Lib.md5/pyd -s s.linktab -o @.^.Modules.o.md5link -e initmd5
@.^.Lib.new/pyd: @.^.Modules.o.newmodule s.linktab
$(MAKEDLK) -d @.^.Lib.new/pyd -s s.linktab -o @.^.Modules.o.newmodule -e initnew
@.^.Lib.operator/pyd: @.^.Modules.o.operator s.linktab
$(MAKEDLK) -d @.^.Lib.operator/pyd -s s.linktab -o @.^.Modules.o.operator -e initoperator