diff options
author | Christian Heimes <christian@cheimes.de> | 2007-11-28 08:28:28 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2007-11-28 08:28:28 (GMT) |
commit | c9543e42330e5f339d6419eba6a8c5a61a39aeca (patch) | |
tree | ee3c677e808d015b6c142e1cca28337e08839818 /Doc/library/new.rst | |
parent | ceee0773d262bfe876e40da927b03279ed9f8419 (diff) | |
download | cpython-c9543e42330e5f339d6419eba6a8c5a61a39aeca.zip cpython-c9543e42330e5f339d6419eba6a8c5a61a39aeca.tar.gz cpython-c9543e42330e5f339d6419eba6a8c5a61a39aeca.tar.bz2 |
Removed the new module
Removed a lot of types from the 'types' module that are available through builtins.
Diffstat (limited to 'Doc/library/new.rst')
-rw-r--r-- | Doc/library/new.rst | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/Doc/library/new.rst b/Doc/library/new.rst deleted file mode 100644 index 832dca6..0000000 --- a/Doc/library/new.rst +++ /dev/null @@ -1,55 +0,0 @@ - -:mod:`new` --- Creation of runtime internal objects -=================================================== - -.. module:: new - :synopsis: Interface to the creation of runtime implementation objects. -.. sectionauthor:: Moshe Zadka <moshez@zadka.site.co.il> - - -The :mod:`new` module allows an interface to the interpreter object creation -functions. This is for use primarily in marshal-type functions, when a new -object needs to be created "magically" and not by using the regular creation -functions. This module provides a low-level interface to the interpreter, so -care must be exercised when using this module. It is possible to supply -non-sensical arguments which crash the interpreter when the object is used. - -The :mod:`new` module defines the following functions: - - -.. function:: instancemethod(function, instance) - - This function will return a method object, bound to *instance*. - *function* must be callable. - - .. XXX no unbound methods anymore - - -.. function:: function(code, globals[, name[, argdefs[, closure]]]) - - Returns a (Python) function with the given code and globals. If *name* is given, - it must be a string or ``None``. If it is a string, the function will have the - given name, otherwise the function name will be taken from ``code.co_name``. If - *argdefs* is given, it must be a tuple and will be used to determine the default - values of parameters. If *closure* is given, it must be ``None`` or a tuple of - cell objects containing objects to bind to the names in ``code.co_freevars``. - - -.. function:: code(argcount, nlocals, stacksize, flags, codestring, constants, names, varnames, filename, name, firstlineno, lnotab) - - This function is an interface to the :cfunc:`PyCode_New` C function. - - .. XXX This is still undocumented!!! - - -.. function:: module(name[, doc]) - - This function returns a new module object with name *name*. *name* must be a - string. The optional *doc* argument can have any type. - - -.. function:: classobj(name, baseclasses, dict) - - This function returns a new class object, with name *name*, derived from - *baseclasses* (which should be a tuple of classes) and with namespace *dict*. - Alias for the built-in :class:`type`. |