summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Added CF module build and project generation (carbon only).Jack Jansen2001-06-262-0/+5
|
* First small step towards bgen-generated CoreFoundation. there is hardly any ↵Jack Jansen2001-06-263-0/+666
| | | | real functionality yet, but method chains seem to work, and so do Retain/Release semantics.
* Add "gi_" (generator-iterator) prefix to names of genobject members.Tim Peters2001-06-261-9/+13
| | | | | Makes it much easier to find references via dumb editor search (former "frame" in particular was near-hopeless).
* more unicode tweaks: fix unicodectype for sizeof(Py_UNICODE) >Fredrik Lundh2001-06-261-2/+3
| | | | sizeof(int)
* Remove the restriction on a mapping's .update() method.Barry Warsaw2001-06-261-9/+7
|
* Add an item about the extension to {}.update() to allow genericBarry Warsaw2001-06-261-0/+5
| | | | mapping objects as an argument.
* Add a bunch of tests for extended dict.update() where the argument isBarry Warsaw2001-06-261-0/+70
| | | | | a non-dictionary mapping object. Include tests for several expected failure modes.
* dict_update(): Generalize this method so {}.update() accepts anyBarry Warsaw2001-06-261-17/+70
| | | | | | | | | | | | | | | "mapping" object, specifically one that supports PyMapping_Keys() and PyObject_GetItem(). This allows you to say e.g. {}.update(UserDict()) We keep the special case for concrete dict objects, although that seems moderately questionable. OTOH, the code exists and works, so why change that? .update()'s docstring already claims that D.update(E) implies calling E.keys() so it's appropriate not to transform AttributeErrors in PyMapping_Keys() to TypeErrors. Patch eyeballed by Tim.
* more unicode tweaks: make unichr(0xdddddddd) behave like u"\Udddddddd"Fredrik Lundh2001-06-261-6/+17
| | | | wrt surrogates. (this extends the valid range from 65535 to 1114111)
* experimental UCS-4 support: don't assume that MS_WIN32 impliesFredrik Lundh2001-06-261-1/+1
| | | | HAVE_USABLE_WCHAR_T
* experimental UCS-4 support: added USE_UCS4_STORAGE define toFredrik Lundh2001-06-263-12/+25
| | | | | | unicodeobject.h, which forces sizeof(Py_UNICODE) == sizeof(Py_UCS4). (this may be good enough for platforms that doesn't have a 16-bit type. the UTF-16 codecs don't work, though)
* experimental UCS-4 support: made compare a bit more robust, in caseFredrik Lundh2001-06-261-11/+14
| | | | | sizeof(Py_UNICODE) >= sizeof(long). also changed surrogate expansion to work if sizeof(Py_UNICODE) > 2.
* experimental UCS-4 support: don't assume that MS_WIN32 impliesFredrik Lundh2001-06-262-5/+5
| | | | HAVE_USABLE_WCHAR_T
* Added a note about recompiling OSAm before distributing.Jack Jansen2001-06-261-0/+1
|
* Fixed typo in doc string.Just van Rossum2001-06-261-1/+1
|
* Fixed bug that prevented shared libs that are submodules of aJust van Rossum2001-06-261-1/+1
| | | | package to be loaded from a PYD resource.
* SF bug #436207: "if 0: yield x" is ignored.Tim Peters2001-06-262-8/+161
| | | | Not anymore <wink>. Pure hack. Doesn't fix any other "if 0:" glitches.
* Teach the types module about generators. Thanks to James Althoff on theTim Peters2001-06-253-0/+31
| | | | Iterators list for bringing it up!
* Return self.trace_dispatch from dispatch_return() to enable stepping through ↵Just van Rossum2001-06-251-0/+1
| | | | generators. (An alternative would be to create a new "yield" debugger event, but that involves many more changes, and might break Bdb subclasses.)
* Updated link to zlib's home page.Fred Drake2001-06-251-3/+2
|
* WaitNextEvent short vs. unsigned short fix.Jack Jansen2001-06-251-1/+1
|
* Initial revisionSteven M. Gava2001-06-253-0/+435
|
* Remove const-ness in inet_pton declaration.Martin v. Löwis2001-06-251-1/+1
|
* Replace snprintf with sprintf.Martin v. Löwis2001-06-251-1/+1
|
* Repair indentation in comment.Tim Peters2001-06-251-2/+9
| | | | Add a temporary driver to help track down remaining leak(s).
* Fix typos in inet_pton/inet_ntop.Martin v. Löwis2001-06-241-2/+3
|
* Provide a definition for offsetof.Martin v. Löwis2001-06-241-0/+8
|
* Emulate inet_{pton,ntop} on systems that don't provide it.Martin v. Löwis2001-06-244-3/+47
|
* Move USE_TOOLBOX_OBJECT_GLUE into acconfig.h.Martin v. Löwis2001-06-241-0/+3
|
* Changed some comments. Removed the caution about clearing globs, sinceTim Peters2001-06-241-3/+3
| | | | clearing a shallow copy _run_examples() makes itself can't hurt anything.
* Clear the copy of the globs dict after running examples. This helps toTim Peters2001-06-241-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | break cycles, which are a special problem when running generator tests that provoke exceptions by invoking the .next() method of a named generator-iterator: then the iterator is named in globs, and the iterator's frame gets a tracekback object pointing back to globs, and gc doesn't chase these types so the cycle leaks. Also changed _run_examples() to make a copy of globs itself, so its callers (direct and indirect) don't have to (and changed the callers to stop making their own copies); *that* much is a change I've been meaning to make for a long time (it's more robust the new way). Here's a way to provoke the symptom without doctest; it leaks at a prodigious rate; if the last two "source" lines are replaced with g().next() the iterator isn't named and then there's no leak: source = """\ def g(): yield 1/0 k = g() k.next() """ code = compile(source, "<source>", "exec") def f(globs): try: exec code in globs except ZeroDivisionError: pass while 1: f(globals().copy()) After this change, running test_generators in an infinite loop still leaks, but reduced from a flood to a trickle.
* doctest systematically leaked memory when handling an exception in anTim Peters2001-06-241-1/+1
| | | | | example (an obvious trackback cycle). Repaired. Bugfix candidate.
* Added a "generate k-combinations of a list" example posted to c.l.py.Tim Peters2001-06-241-1/+49
|
* New tests to provoke SyntaxErrors unique to generators. Minor fiddlingTim Peters2001-06-241-6/+85
| | | | of other tests.
* doctest doesn't handle intentional SyntaxError exceptions gracefully,Tim Peters2001-06-241-1/+1
| | | | | because it picks up the first line of traceback.format_exception_only() instead of the last line. Pick up the last line instead!
* Another variant of the 2-3-5 test, mixing generators with a LazyList class.Tim Peters2001-06-241-0/+37
| | | | | | | Good news: Some of this stuff is pretty sophisticated (read nuts), and I haven't bumped into a bug yet. Bad news: If I run the doctest in an infinite loop, memory is clearly leaking.
* Pure brute-force hackery to allow Python to build on Windows again,Tim Peters2001-06-241-0/+12
| | | | | because I need to make progress and don't have time now to think about whatever it is the new code is trying to accomplish.
* More tests.Tim Peters2001-06-241-1/+68
|
* Add a recursive Sieve of Eratosthenes prime generator. Not practical,Tim Peters2001-06-231-1/+39
| | | | but it's a heck of a good generator exerciser (think about it <wink>).
* Add all the examples from PEP 255, and a few email examples.Tim Peters2001-06-231-2/+183
|
* New std test for generators, initially populated with doctests NeilS putTim Peters2001-06-231-0/+139
| | | | together.
* Properly use &&. Closes bug #434988.Martin v. Löwis2001-06-231-2/+2
|
* Properly use &&. Closes bug #434989.Martin v. Löwis2001-06-231-1/+1
|
* Patch #401196: Configuration machinery for IPv6.Martin v. Löwis2001-06-238-344/+2197
| | | | | Contributed by Jun-ichiro "itojun" Hagino. get{addr,name}info emulation code taken from WIDE.
* Fix typoAndrew M. Kuchling2001-06-232-2/+2
|
* Correct erroneous description of precmd.Eric S. Raymond2001-06-231-2/+6
|
* Change the semantics of "return" in generators, as discussed on theTim Peters2001-06-232-25/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Iterators list and Python-Dev; e.g., these all pass now: def g1(): try: return except: yield 1 assert list(g1()) == [] def g2(): try: return finally: yield 1 assert list(g2()) == [1] def g3(): for i in range(3): yield None yield None assert list(g3()) == [None] * 4 compile.c: compile_funcdef and com_return_stmt: Just van Rossum's patch to compile the same code for "return" regardless of function type (this goes back to the previous scheme of returning Py_None). ceval.c: gen_iternext: take a return (but not a yield) of Py_None as meaning the generator is exhausted.
* Remove some bogus trailing whitespace.Fred Drake2001-06-231-2/+2
|
* Fix minor markup nits.Fred Drake2001-06-232-6/+2
|
* Use a named reference to another chapter instead of hard coding theFred Drake2001-06-231-2/+2
| | | | | chapter number. This also makes the reference a hyperlink in the HTML version.