summaryrefslogtreecommitdiff
path: root/Lib/types.py
Commit message (Collapse)AuthorAgeFilesLines
* remove more code for restricted executionBenjamin Peterson2009-08-281-9/+4
|
* restricted environments are no moreBenjamin Peterson2009-08-281-5/+1
|
* Issue 2408: remove the _types moduleAmaury Forgeot d'Arc2008-04-081-11/+3
| | | | | | | | | It was only used as a helper in types.py to access types (GetSetDescriptorType and MemberDescriptorType), when they can easily be obtained with python code. These expressions even work with Jython. I don't know what the future of the types module is; (cf. discussion in http://bugs.python.org/issue1605 ) at least this change makes it simpler.
* Patch #1520294: Support for getset and member descriptors in types.py,Barry Warsaw2006-07-271-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | inspect.py, and pydoc.py. Specifically, this allows for querying the type of an object against these built-in C types and more importantly, for getting their docstrings printed in the interactive interpreter's help() function. This patch includes a new built-in module called _types which provides definitions of getset and member descriptors for use by the types.py module. These types are exposed as types.GetSetDescriptorType and types.MemberDescriptorType. Query functions are provided as inspect.isgetsetdescriptor() and inspect.ismemberdescriptor(). The implementations of these are robust enough to work with Python implementations other than CPython, which may not have these fundamental types. The patch also includes documentation and test suite updates. I commit these changes now under these guiding principles: 1. Silence is assent. The release manager has not said "no", and of the few people that cared enough to respond to the thread, the worst vote was "0". 2. It's easier to ask for forgiveness than permission. 3. It's so dang easy to revert stuff in svn, that you could view this as a forcing function. :) Windows build patches will follow.
* Oops! Restored the pickle test to test_pyclbr, but changed types.py soTim Peters2004-07-181-4/+3
| | | | | that pyclbr doesn't need to special-case modules that do "from types import *".
* [ 683376 ] Adding NotImplementedType to types.pyJust van Rossum2003-02-101-0/+1
|
* SF patch 568629 by Oren Tirosh: types made callable.Guido van Rossum2002-06-141-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* Skip Montanaro's patch, SF 559833, exposing xrange type in builtins.Raymond Hettinger2002-06-051-1/+1
| | | | | Also, added more regression tests to cover the new type and test its conformity with range().
* add BooleanTypeSkip Montanaro2002-05-211-0/+1
|
* Remove some now-obsolete generator future statements.Tim Peters2002-04-011-3/+1
| | | | | I left the email pkg alone; I'm not sure how Barry would like to handle that.
* Patch #487455: make types.StringTypes a tuple.Martin v. Löwis2001-12-021-2/+2
|
* Rename "dictionary" (type and constructor) to "dict".Tim Peters2001-10-291-1/+1
|
* Don't export generators future infoJeremy Hylton2001-09-261-1/+1
|
* SF [#463737] Add types.CallableIterTypeTim Peters2001-09-251-3/+5
| | | | | Rather than add umpteen new obscure internal Iter types, got rid of all of them. See the new comment.
* SF bug [#460467] file objects should be subclassable.Tim Peters2001-09-131-6/+1
| | | | Preliminary support. What's here works, but needs fine-tuning.
* Patch #445762: Support --disable-unicodeMartin v. Löwis2001-08-171-1/+6
| | | | | | | | - Do not compile unicodeobject, unicodectype, and unicodedata if Unicode is disabled - check for Py_USING_UNICODE in all places that use Unicode functions - disables unicode literals, and the builtin functions - add the types.StringTypes list - remove Unicode literals from most tests.
* Only catch the errors that can actually occur, as reported in bug #411881.Martin v. Löwis2001-08-111-3/+7
|
* Patch #449083: Use builtins to initalize the module.Martin v. Löwis2001-08-081-7/+7
|
* Merge of descr-branch back into trunk.Tim Peters2001-08-021-3/+9
|
* Preliminary support for "from __future__ import generators" to enableGuido van Rossum2001-07-151-0/+1
| | | | | | | | the yield statement. I figure we have to have this in before I can release 2.2a1 on Wednesday. Note: test_generators is currently broken, I'm counting on Tim to fix this.
* Teach the types module about generators. Thanks to James Althoff on theTim Peters2001-06-251-0/+5
| | | | Iterators list for bringing it up!
* Marc-Andre Lemburg: add UnicodeType.Guido van Rossum2000-03-101-0/+1
|
* The third and final doc-string sweep by Ka-Ping Yee.Guido van Rossum2000-02-041-2/+4
| | | | | | | | The attached patches update the standard library so that all modules have docstrings beginning with one-line summaries. A new docstring was added to formatter. The docstring for os.py was updated to mention nt, os2, ce in addition to posix, dos, mac.
* Added BufferType, the type returned by the new builtin buffer(). Greg Stein.Guido van Rossum1999-03-191-0/+1
|
* Use __stdin__ instead of stdin to derive FileType -- safer againstGuido van Rossum1998-12-191-1/+1
| | | | assignments.
* Mass check-in after untabifying all files that need it.Guido van Rossum1998-03-261-9/+9
|
* Use sys.exc_info() where needed.Guido van Rossum1997-09-291-2/+4
|
* Added some try-excepts so that it can be imported in restricted modeGuido van Rossum1997-09-041-6/+15
| | | | | | (though some type names are undefined in that case, e.g. CodeType (inaccessible), FileType (not always accessible), and TracebackType and FrameType (inaccessible).
* Ellipses -> Ellipsis rename (the dictionary really says that it shouldGuido van Rossum1996-10-111-1/+1
| | | | | | | | be Ellipsis!). Bumped the API version because a linker-visible symbol is affected. Old C code will still compile -- there's a b/w compat macro. Similarly, old Python code will still run, builtin exports both Ellipses and Ellipsis.
* Added Slice and Ellipses types.Guido van Rossum1996-10-111-0/+3
|
* better way to define ComplexTypeGuido van Rossum1996-02-131-3/+3
|
* add ComplexTypeGuido van Rossum1996-01-251-0/+4
|
* added DictType as alias for DictionaryTypeGuido van Rossum1995-02-271-1/+1
|
* Cosmetic changesGuido van Rossum1994-09-291-14/+17
|
* Two new generally useful modules: types defines names for all built-in types,Guido van Rossum1994-06-231-0/+43
StringIO implements pseudo files writing into and reading from strings.