summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Mondo changes to the iterator stuff, without changing how Python codeGuido van Rossum2001-04-239-58/+182
| | | | | | | | | | | | | | | | | | | | | | | | sees it (test_iter.py is unchanged). - Added a tp_iternext slot, which calls the iterator's next() method; this is much faster for built-in iterators over built-in types such as lists and dicts, speeding up pybench's ForLoop with about 25% compared to Python 2.1. (Now there's a good argument for iterators. ;-) - Renamed the built-in sequence iterator SeqIter, affecting the C API functions for it. (This frees up the PyIter prefix for generic iterator operations.) - Added PyIter_Check(obj), which checks that obj's type has a tp_iternext slot and that the proper feature flag is set. - Added PyIter_Next(obj) which calls the tp_iternext slot. It has a somewhat complex return condition due to the need for speed: when it returns NULL, it may not have set an exception condition, meaning the iterator is exhausted; when the exception StopIteration is set (or a derived exception class), it means the same thing; any other exception means some other error occurred.
* At the suggestion of Peter Funk, document 'key in dict' and 'key notGuido van Rossum2001-04-231-6/+6
| | | | in dict' after has_key(), with a \versionadded{2.2} note.
* Update publish-to-SourceForge scripts to automatically determine if theFred Drake2001-04-222-7/+26
| | | | | branch is the head (development) branch or a maintenance brach, and use the appropriate target directory for each.
* Only document <file>.xreadlines() once; added version annotation.Fred Drake2001-04-221-7/+4
| | | | This closes SF bug #417943.
* Process Setup* files with makesetup in the same order as the makefile.Neil Schemenauer2001-04-212-3/+3
|
* Add test suite for iterators.Guido van Rossum2001-04-212-0/+247
|
* Oops, forgot to merge this from the iter-branch to the trunk.Guido van Rossum2001-04-211-9/+37
| | | | This adds "for line in file" iteration, as promised.
* Give UserDict new __contains__ and __iter__ methods.Tim Peters2001-04-212-1/+19
|
* encode(): Handle Latin-1 input characters better.Fred Drake2001-04-211-3/+7
|
* Add support for <memberline/> (needs markup improvement!).Fred Drake2001-04-211-1/+5
| | | | | | Update <versionadded/> to recent addition of optional explanatory text; make the explanation text take the same attribute name for both <versionadded/> and <versionchanged/>.
* Fix a number of minor markup errors.Fred Drake2001-04-213-7/+7
|
* The (fairly recent) \textasciicircum is not supported by LaTeX2HTML; addFred Drake2001-04-211-0/+1
| | | | support for it here.
* SF bug #417508: 'hypot' not found with Borland C++Build.Tim Peters2001-04-212-0/+3
|
* SF but #417587: compiler warnings compiling 2.1.Tim Peters2001-04-214-8/+1
| | | | Repaired *some* of the SGI compiler warnings Sjoerd Mullender reported.
* Teach Windows about new iterobject.c.Tim Peters2001-04-201-0/+15
|
* Adding iterobject.[ch], which were accidentally not added. Sorry\!Guido van Rossum2001-04-202-0/+201
|
* Iterators phase 1. This comprises:Guido van Rossum2001-04-2016-25/+256
| | | | | | | | | | | | | | | | | | | | | | new slot tp_iter in type object, plus new flag Py_TPFLAGS_HAVE_ITER new C API PyObject_GetIter(), calls tp_iter new builtin iter(), with two forms: iter(obj), and iter(function, sentinel) new internal object types iterobject and calliterobject new exception StopIteration new opcodes for "for" loops, GET_ITER and FOR_ITER (also supported by dis.py) new magic number for .pyc files new special method for instances: __iter__() returns an iterator iteration over dictionaries: "for x in dict" iterates over the keys iteration over files: "for x in file" iterates over lines TODO: documentation test suite decide whether to use a different way to spell iter(function, sentinal) decide whether "for key in dict" is a good idea use iterators in map/filter/reduce, min/max, and elsewhere (in/not in?) speed tuning (make next() a slot tp_next???)
* dispatcher.__repr__() was unprepared to handle the address for a UnixJeremy Hylton2001-04-201-11/+16
| | | | | domain socket. Fix that and make the error message for failures a little more helpful by including the class name.
* Oops. Removed dictiter_new decl that wasn't supposed to go in yet.Guido van Rossum2001-04-201-2/+0
|
* Implement, test and document "key in dict" and "key not in dict".Guido van Rossum2001-04-205-8/+59
| | | | | | | | | I know some people don't like this -- if it's really controversial, I'll take it out again. (If it's only Alex Martelli who doesn't like it, that doesn't count as "real controversial" though. :-) That's why this is a separate checkin from the iterators stuff I'm about to check in next.
* CVS patch 416248: 2.1c1 unicodeobject: unused vrbl cleanup, from Mark Favas.Tim Peters2001-04-191-2/+0
|
* Revert previous checkin, which caused test_unicodedata to fail.Jeremy Hylton2001-04-191-33/+0
|
* Weak*Dictionary: Added docstrings to the classes.Fred Drake2001-04-191-24/+36
| | | | | | | | | | | | | | | | Weak*Dictionary.update(): No longer create a temporary list to hold the things that will be stuffed into the underlying dictionary. This had been done so that if any of the objects used as the weakly-held value was not weakly-referencable, no updates would take place (TypeError would be raised). With this change, TypeError will still be raised but a partial update could occur. This is more like other .update() implementations. Thoughout, use of the name "ref" as a local variable has been removed. The original use of the name occurred when the function to create a weak reference was called "new"; the overloaded use of the name could be confusing for someone reading the code. "ref" used as a variable name has been replaced with "wr" (for 'weak reference').
* Add versioning notes: many of the signatures changed to allow the timeFred Drake2001-04-191-0/+5
| | | | | used to be omitted (meaning use the current time) as of Python 2.1. Users who need cross-version portability need to know things like this.
* Move Windows stuff to 2.2, so CVS builds won't interfere with 2.1Tim Peters2001-04-185-20/+22
| | | | installations.
* Cut-&-paste-o noted by Wolfgang Teschner: decompressobj() returnsFred Drake2001-04-181-1/+1
| | | | *DE*compression objects, not compression objects!
* Remove BrowserControl module; this had been left in for Python 1.5.2Fred Drake2001-04-181-157/+0
| | | | support.
* Remove legacy support for the BrowserControl module; the webbrowserFred Drake2001-04-181-7/+3
| | | | | module has been included since Python 2.0, and that is the preferred interface.
* Suggestion from Keith Briggs: refer to RE objects consistently instead ofFred Drake2001-04-181-10/+9
| | | | introducing a new term ("regex") without defining it.
* Patch #416953: Cache ASCII characters to speed up ASCII decoding.Martin v. Löwis2001-04-181-0/+33
|
* Sync version number with the current CVS version.Fred Drake2001-04-181-1/+1
| | | | | | (Note that the docs are also being maintained on the 2.1.1 maintenance branch, so users interested only in corrections and clarifications can get that.)
* Add description of the "explanation" optional parameter added to theFred Drake2001-04-181-5/+8
| | | | | | \versionadded macro. Note: this should not be merged into the 2.1 maintenance branch.
* Make a number of small clarifications and correct a whole bunch of typos,Fred Drake2001-04-181-15/+18
| | | | all reported by Bruce Smith.
* Sync version number with the current CVS version.Fred Drake2001-04-181-3/+3
| | | | | | (Note that the docs are also being maintained on the 2.1.1 maintenance branch, so users interested only in corrections and clarifications can get that.)
* Bump the version number in more placesGuido van Rossum2001-04-184-11/+11
|
* Change the version to 2.2a0. This may look strange, but indicatesGuido van Rossum2001-04-181-4/+4
| | | | it's 2.2 before the first alpha release.
* update_yourself(): Removed unused local variable reported byBarry Warsaw2001-04-181-1/+0
| | | | PyChecker.
* __init__(): Removed unused local variable reported by PyChecker.Barry Warsaw2001-04-181-1/+0
|
* StripWidget.__init__(), update_yourself(): Removed some unused localBarry Warsaw2001-04-181-21/+20
| | | | | | | | variables reported by PyChecker. __togglegentype(): PyChecker accurately reported that the variable __gentypevar was unused -- actually this whole method is currently unused so comment it out.
* Helpwin.__init__(): Removed an unused local variable (via import)Barry Warsaw2001-04-181-1/+1
| | | | reported by PyChecker.
* Bump the version to 1.1Barry Warsaw2001-04-181-1/+1
|
* There have been a few new Python releases <wink> in the 2 years sinceBarry Warsaw2001-04-181-10/+7
| | | | | this tool was last touched! Update some of the introductory material and bump the version to 1.1.
* Add note about the version in which GetoptError was added -- this canFred Drake2001-04-181-0/+3
| | | | bite people interested in 1.5.2 compatibility.
* Added support for optional explanation parameter to the \versionaddedFred Drake2001-04-181-13/+14
| | | | | | | | macro. Refactored do_cmd_versionadded() and do_cmd_versionchanged() to do most of the work in a helper function, with the do_cmd_*() wrappers just supplying a portion of the replacement text.
* \versionadded: Add support for including an explanatory note along withFred Drake2001-04-181-2/+7
| | | | the versioning information, similar to \versionchanged.
* Fix compileall.py so that it fails on SyntaxErrorsJeremy Hylton2001-04-182-10/+29
| | | | | | | | | | | | | | | | The changes cause compilation failures in any file in the Python installation lib directory to cause the install to fail. It looks like compileall.py intended to behave this way, but a change to py_compile.py and a separate bug defeated it. Fixes SF bug #412436 This change affects the test suite, which contains several files that contain intentional errors. The solution is to extend compileall.py with the ability to skip compilation of selected files. NB compileall.py is changed so that compile_dir() returns success only if all recursive calls to compile_dir() also check success.
* Fix compileall.py so that it fails on SyntaxErrorsJeremy Hylton2001-04-1810-16/+11
| | | | | | | | | | | | | | | | | | | | | The changes cause compilation failures in any file in the Python installation lib directory to cause the install to fail. It looks like compileall.py intended to behave this way, but a change to py_compile.py and a separate bug defeated it. Fixes SF bug #412436 This change affects the test suite, which contains several files that contain intentional errors. The solution is to extend compileall.py with the ability to skip compilation of selected files. In the test suite, rename nocaret.py and test_future[3..7].py to start with badsyntax_nocaret.py and badsyntax_future[3..7].py. Update the makefile to skip compilation of these files. Update the tests to use the name names for imports. NB compileall.py is changed so that compile_dir() returns success only if all recursive calls to compile_dir() also check success.
* Unused variable (caught by PyChecker) removed.Eric S. Raymond2001-04-171-1/+0
|
* This commit was manufactured by cvs2svn to create tag 'release21'.v2.1cvs2svn2001-04-161-0/+1
|
* Noted what's new in 2.1 (final).Guido van Rossum2001-04-161-0/+21
| | | | Hopefully this is the last checkin for 2.1!