summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Update test to accomodate the change to the namespace_separator parameterFred Drake2001-04-252-10/+32
| | | | | | | of ParserCreate(). Added assignment tests for the ordered_attributes and specified_attributes values, similar to the checks for the returns_unicode attribute.
* ParserCreate(): Allow an empty string for the namespace_separator argument;Fred Drake2001-04-251-68/+82
| | | | | | | | | | | | while not generally a good idea, this is used by RDF users, and works to implement RDF-style namespace+localname concatenation as defined in the RDF specifications. (This also corrects a backwards-compatibility bug.) Be more conservative while clearing out handlers; set the slot in the self->handlers array to NULL before DECREFing the callback. Still more adjustments to make the code style internally consistent.
* SF bug 418615: regular expression bug in pipes.py.Tim Peters2001-04-251-4/+4
| | | | | | | | Obviously bad regexps, spotted by Jeffery Collins. HELP! I can't run this on Windows, and the module test() function probably doesn't work on anyone's box. Could a Unixoid please write an at least minimal working test and add it to the std test suite?
* SF bug 418296: WinMain.c should use WIN32_LEAN_AND_MEAN.Tim Peters2001-04-242-1/+2
| | | | | I believe Kevin Rodgers here! The old WINDOWS_LEAN_AND_MEAN has, AFAICT, always been wrong.
* Fix typo in docstringAndrew M. Kuchling2001-04-231-1/+1
|
* Bump version # for final releaseAndrew M. Kuchling2001-04-231-1/+1
|
* This patch originated from an idea by Martin v. Loewis who submitted aMarc-André Lemburg2001-04-233-54/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch for sharing single character Unicode objects. Martin's patch had to be reworked in a number of ways to take Unicode resizing into consideration as well. Here's what the updated patch implements: * Single character Unicode strings in the Latin-1 range are shared (not only ASCII chars as in Martin's original patch). * The ASCII and Latin-1 codecs make use of this optimization, providing a noticable speedup for single character strings. Most Unicode methods can use the optimization as well (by virtue of using PyUnicode_FromUnicode()). * Some code cleanup was done (replacing memcpy with Py_UNICODE_COPY) * The PyUnicode_Resize() can now also handle the case of resizing unicode_empty which previously resulted in an error. * Modified the internal API _PyUnicode_Resize() and the public PyUnicode_Resize() API to handle references to shared objects correctly. The _PyUnicode_Resize() signature changed due to this. * Callers of PyUnicode_FromUnicode() may now only modify the Unicode object contents of the returned object in case they called the API with NULL as content template. Note that even though this patch passes the regression tests, there may still be subtle bugs in the sharing code.
* 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.