Commit Graph

29544 Commits

Author SHA1 Message Date
Raymond Hettinger 7dacda2947 Provide more information representations of repeat() and count(). 2004-04-08 21:54:00 +00:00
Fred Drake 94ffbb71a8 give rational filenames to some of the generated HTML 2004-04-08 19:44:31 +00:00
Fred Drake 4cc425a0a3 switch to PNG navigation icons by default 2004-04-08 18:51:39 +00:00
Fred Drake 4f580e8394 include both the GIF and PNG icons in the HTML package 2004-04-08 18:50:51 +00:00
Fred Drake 899072ab71 avoid stripping space after indexing macros 2004-04-08 15:30:12 +00:00
Skip Montanaro d0c0c41fe9 note --trackcalls flag in trace module 2004-04-07 16:03:02 +00:00
Skip Montanaro cafc811415 Added --trackcalls command line arg to display crude caller/callee
relationships at program exit.  Output is a bit prettier than that for
--listfuncs but won't parse as easily using downstream postprocessing tools.
2004-04-07 15:46:05 +00:00
Raymond Hettinger 7eddd78a15 Use continue instead of break whereever possible. 2004-04-07 14:38:08 +00:00
Raymond Hettinger d3b836d202 * Improve readability and remove data dependencies by converting
pre-increment forms to post-increment forms.  Post-incrementing
also eliminates the need for negative array indices for oparg fetches.

* In exception handling code, check for class based exceptions before
  the older string based exceptions.
2004-04-07 13:17:27 +00:00
Raymond Hettinger 467a698bd2 Small code improvements for readability, code size, and/or speed.
BINARY_SUBSCR:
    * invert test for normal case fall through
    * eliminate err handling code by jumping to slow_case

LOAD_LOCALS:
    * invert test for normal case fall through
    * continue instead of break for the non-error case

STORE_NAME and DELETE_NAME:
    * invert test for normal case fall through

LOAD_NAME:
    * continue instead of break for the non-error case

DELETE_FAST:
    * invert test for normal case fall through

LOAD_DEREF:
    * invert test for normal case fall through
    * continue instead of break for the non-error case
2004-04-07 11:39:21 +00:00
Andrew M. Kuchling 22ab06e4de Fix comment typo 2004-04-06 19:43:03 +00:00
Andrew M. Kuchling d9b38d2729 Remove specific Python version from #! 2004-04-06 19:42:34 +00:00
Raymond Hettinger 7c9586545e Simplify previous checkin (bitfields for WHY codes).
Restores the self-documenting enum declaration.
2004-04-06 10:11:10 +00:00
Raymond Hettinger 06032cb664 Coded WHY flags as bitfields (taking inspiration from tp_flags).
This allows multiple flags to be tested in a single compare
which eliminates unnecessary compares and saves a few bytes.
2004-04-06 09:37:35 +00:00
Hye-Shik Chang 4057483164 SF Patch #926375: Remove a useless UTF-16 support code that is never
been used. (Suggested by Martin v. Loewis)
2004-04-06 07:24:51 +00:00
Tim Peters 8a5c3c76be Since the fast_yield branch target was introduced, it appears that most
tests of "why" against WHY_YIELD became useless.  This patch removes them,
but assert()s that why != WHY_YIELD everywhere such a test was removed.
The test suite ran fine under a debug build (i.e., the asserts never
triggered).
2004-04-05 19:36:21 +00:00
Raymond Hettinger ed9192e2ae Improve previous checkin to use a slot check instead of equivalent
attribute name lookup.
2004-04-05 08:14:48 +00:00
Raymond Hettinger e2eda606a8 Improve accuracy of sequence and mapping checks. 2004-04-04 08:51:41 +00:00
Andrew MacIntyre d12dfbbcd9 OS/2's TCP/IP stack supports AF_UNIX sockets, with the limitation that
the socket name must start with /socket32/.  Unlike Unix systems, this
file never exists in the file system.
2004-04-04 07:13:49 +00:00
Andrew MacIntyre 69e18c9344 OS/2 has support for spawnvp() and spawnvpe() in the C libraries supplied
with major C compilers (VACPP, EMX+gcc and [Open]Watcom).

Also tidy up the export of spawn*() symbols in the os module to match what
is found/implemented.
2004-04-04 07:11:43 +00:00
Andrew MacIntyre 4e10ed3b86 If a file is opened with an explicit buffer size >= 1, repeated
close() calls would attempt to free() the buffer already free()ed on
the first close().     [bug introduced with patch #788249]

Making sure that the buffer is free()ed in file object deallocation is
a belt-n-braces bit of insurance against a memory leak.
2004-04-04 07:01:35 +00:00
Neal Norwitz ba813e2089 #928751, fix typos in socket doc 2004-04-03 18:02:37 +00:00
Skip Montanaro 7a92d74c52 It would help if I deleted the old pystack!
Also, move pystack comment down next to it
2004-04-02 14:53:55 +00:00
Skip Montanaro 74d07f2bfa include local variables when dumping Python stack trace 2004-04-02 14:51:13 +00:00
Fred Drake 456d3258d6 Fix support for the "prog" keyword to the OptionParser constructor, as well
as directly setting the .prog attribute (which should be supported based on
the class docstring).
Closes SF bug #850964.
2004-04-01 07:40:35 +00:00
Fred Drake 8effa01931 fix typo that wasn't properly fixed in revision 1.144 2004-04-01 04:30:29 +00:00
Jeremy Hylton d4ceb31664 Bump the magic number to avoid sharing bytecode between 2.3 and 2.4.
Revise the long comment that explained details of the magic number
in gory detail.
2004-04-01 02:45:22 +00:00
Andrew M. Kuchling b67c94318e [Bugfix candidate] Escape traceback type and value. There are probably additional cases where cgitb.py doesn't escape as paranoidly as it should (e.g. attribute names) 2004-03-31 20:17:56 +00:00
Martin v. Löwis fb66cd2540 Patch #924497: find(1) all files with /usr/local/bin/python in them.
Backported to 2.3.
2004-03-31 18:59:04 +00:00
Guido van Rossum 59db96f2a3 When /tmp has certain sticky bits set, newly created subdirectories
inherit those bits, causing the test_mkdtemp.test_mode() test to fail.
Remove those before comparing the actual mode to the expected mode.
2004-03-31 18:53:29 +00:00
Fred Drake 862b46bbc1 add a heavy box around warning notices to make them really stand out in the
PDF and PostScript versions of the docs (the CSS already does this for HTML)
2004-03-31 08:08:34 +00:00
Fred Drake 90756c2da7 add missing and forthcoming releases 2004-03-31 08:04:46 +00:00
Fred Drake 34c43202eb Emphasize the requirement that Python.h be included first more strongly.
Closes SF bug #837228; backporting for Python 2.3.4.
2004-03-31 07:45:46 +00:00
Fred Drake 203b10c75a added scripts to the list of files automatically included in the
distribution (see SF bug #796042)
2004-03-31 01:50:37 +00:00
Andrew MacIntyre da4d6cb573 OS/2 VACPP build updates/fixes 2004-03-29 11:53:38 +00:00
Tim Peters 174175bf3a Added a comment about the unreferenced PyThreadState.tick_counter
member.
2004-03-29 02:24:26 +00:00
Andrew M. Kuchling aeaec8d4aa fix typo 2004-03-29 01:19:54 +00:00
Raymond Hettinger f13c024002 Insert missing pronoun 2004-03-28 22:44:09 +00:00
Tim Peters 116d83ce71 SF bug 924242: socket._fileobject._getclosed() returns wrong value
The .closed property always returned the wrong result.

Bugfix candidate!
2004-03-28 02:20:45 +00:00
Skip Montanaro 165163f245 add usage() function, -h(elp) flag and long versions of short flags 2004-03-27 18:43:56 +00:00
Skip Montanaro dbb407808a - add entry for complex number
- fix a couple typos
- refine definitions for "interpreted" and "coercion" based upon updates on
  the python glossary wiki
2004-03-27 18:23:11 +00:00
Raymond Hettinger d732c95eb0 Revert 1.51 booleans so that sre will still run on old pythons. 2004-03-27 09:24:36 +00:00
Raymond Hettinger 968c56a626 Simple Optimizations:
* Factor constant expressions out of loops.
* Presize a list being grown to a known length.
2004-03-26 23:24:00 +00:00
Raymond Hettinger 29e383754e Remove unnecessary test. (Thanks Skip) 2004-03-26 20:16:39 +00:00
Fred Drake 8123ff6bca remove out-of-date warning 2004-03-26 17:11:10 +00:00
David Ascher 1c5701d36c Fix test failure for test_tcl on OS/X and Windows if a
version of Tcl other than ActiveTcl is installed (ActiveTcl
included TclX, other Tcl distros didn't).

I'm removing the package loading test because it's hard to
come up with a package that is guaranteed to be in any Tcl installation.

Special-casing darwin and windows is ok since that leaves the
only Tk platform (X) which the test was trying to address.
2004-03-26 15:10:25 +00:00
Armin Rigo 01ab279056 Marshal clean-up (SF patch #873224) 2004-03-26 15:09:27 +00:00
Raymond Hettinger 01c9f8c35f Simple optimizations:
* pre-build a single identity function for the fixup function
* pre-build membership tests in dictionaries instead of in-line tuples
* assign len() to a local variable
* assign append() methods to a local variable
* use xrange() instead of range()
* replace "x<<1" with "x+x"
2004-03-26 11:16:55 +00:00
Raymond Hettinger 707483fdef Update timeit example to reflect current performance. 2004-03-26 07:56:23 +00:00
Fred Drake 4b49823edd make sure the default manifest generation includes files identified as
scripts
closes SF bug 796042
2004-03-25 22:04:52 +00:00