]> granicus.if.org Git - python/log
python
18 years agoneedforspeed: stringlib refactoring (in progress)
Fredrik Lundh [Fri, 26 May 2006 17:04:58 +0000 (17:04 +0000)]
needforspeed: stringlib refactoring (in progress)

18 years agoAdd missing svn:eol-style property to text files.
Tim Peters [Fri, 26 May 2006 16:53:04 +0000 (16:53 +0000)]
Add missing svn:eol-style property to text files.

18 years agoWhitespace normalization.
Tim Peters [Fri, 26 May 2006 16:52:04 +0000 (16:52 +0000)]
Whitespace normalization.

18 years agoRepair Windows compiler warnings about mixing
Tim Peters [Fri, 26 May 2006 16:49:28 +0000 (16:49 +0000)]
Repair Windows compiler warnings about mixing
signed and unsigned integral types in comparisons.

18 years agoFor now, I gave up with automatic conversion of reST to Python-latex,
Thomas Heller [Fri, 26 May 2006 16:42:44 +0000 (16:42 +0000)]
For now, I gave up with automatic conversion of reST to Python-latex,
so I'm writing this in latex now.

Skeleton for the ctypes reference.

18 years agoneedforspeed: use Py_LOCAL on a few more locals in stringobject.c
Fredrik Lundh [Fri, 26 May 2006 16:32:42 +0000 (16:32 +0000)]
needforspeed: use Py_LOCAL on a few more locals in stringobject.c

18 years agoAdd -t option to allow easy test selection.
Steve Holden [Fri, 26 May 2006 16:27:59 +0000 (16:27 +0000)]
Add -t option to allow easy test selection.
Action verbose option correctly.
Tweak operation counts. Add empty and new instances tests.
Enable comparisons across different warp factors. Change version.

18 years agofix signed/unsigned mismatch in struct
Bob Ippolito [Fri, 26 May 2006 16:23:28 +0000 (16:23 +0000)]
fix signed/unsigned mismatch in struct

18 years agoTest for more edge strip cases; leading and trailing separator gets removed
Andrew Dalke [Fri, 26 May 2006 16:22:52 +0000 (16:22 +0000)]
Test for more edge strip cases; leading and trailing separator gets removed
even with strip(..., 0)

18 years agoEeked out another 3% or so performance in split whitespace by cleaning up the algorithm.
Andrew Dalke [Fri, 26 May 2006 15:21:01 +0000 (15:21 +0000)]
Eeked out another 3% or so performance in split whitespace by cleaning up the algorithm.

18 years agoEnable PY_USE_INT_WHEN_POSSIBLE in struct
Bob Ippolito [Fri, 26 May 2006 14:29:35 +0000 (14:29 +0000)]
Enable PY_USE_INT_WHEN_POSSIBLE in struct

18 years agoFix _struct typo that broke some 64-bit platforms
Bob Ippolito [Fri, 26 May 2006 14:23:21 +0000 (14:23 +0000)]
Fix _struct typo that broke some 64-bit platforms

18 years agoFix distutils so that libffi will cross-compile between darwin/x86 and darwin/ppc
Bob Ippolito [Fri, 26 May 2006 14:07:23 +0000 (14:07 +0000)]
Fix distutils so that libffi will cross-compile between darwin/x86 and darwin/ppc

18 years agoTypo fix
Andrew M. Kuchling [Fri, 26 May 2006 14:04:19 +0000 (14:04 +0000)]
Typo fix

18 years agoAdd buffer support for struct, socket
Andrew M. Kuchling [Fri, 26 May 2006 14:03:41 +0000 (14:03 +0000)]
Add buffer support for struct, socket

18 years agoExplicitly close files. I'm trying to stop the frequent spurious test_tarfile
Tim Peters [Fri, 26 May 2006 14:02:05 +0000 (14:02 +0000)]
Explicitly close files.  I'm trying to stop the frequent spurious test_tarfile
failures on Windows buildbots, but it's hard to know how since the regrtest
failure output is useless here, and it never fails when a buildbot slave runs
test_tarfile the second time in verbose mode.

18 years agoChanges to string.split/rsplit on whitespace to preallocate space in the
Andrew Dalke [Fri, 26 May 2006 14:00:45 +0000 (14:00 +0000)]
Changes to string.split/rsplit on whitespace to preallocate space in the
results list.

Originally it allocated 0 items and used the list growth during append.  Now
it preallocates 12 items so the first few appends don't need list reallocs.

("Here are some words ."*2).split(None, 1) is 7% faster
("Here are some words ."*2).split() is is 15% faster

  (Your milage may vary, see dealership for details.)

File parsing like this

    for line in f:
        count += len(line.split())

is also about 15% faster.  There is a slowdown of about 3% for large
strings because of the additional overhead of checking if the append is
to a preallocated region of the list or not.  This will be the rare case.
It could be improved with special case code but we decided it was not
useful enough.

There is a cost of 12*sizeof(PyObject *) bytes per list.  For the normal
case of file parsing this is not a problem because of the lists have
a short lifetime.  We have not come up with cases where this is a problem
in real life.

I chose 12 because human text averages about 11 words per line in books,
one of my data sets averages 6.2 words with a final peak at 11 words per
line, and I work with a tab delimited data set with 8 tabs per line (or
9 words per line).  12 encompasses all of these.

Also changed the last rstrip code to append then reverse, rather than
doing insert(0).  The strip() and rstrip() times are now comparable.

18 years agoUse open() to open files (was using file()).
Tim Peters [Fri, 26 May 2006 13:39:17 +0000 (13:39 +0000)]
Use open() to open files (was using file()).

18 years agofix #1229380 No struct.pack exception for some out of range integers
Bob Ippolito [Fri, 26 May 2006 13:15:44 +0000 (13:15 +0000)]
fix #1229380 No struct.pack exception for some out of range integers

18 years agoAdded more rstrip tests, including for prealloc'ed arrays
Andrew Dalke [Fri, 26 May 2006 13:05:55 +0000 (13:05 +0000)]
Added more rstrip tests, including for prealloc'ed arrays

18 years agoquick hack to fix busted binhex test
Bob Ippolito [Fri, 26 May 2006 12:52:53 +0000 (12:52 +0000)]
quick hack to fix busted binhex test

18 years agoAdd str.partition()
Andrew M. Kuchling [Fri, 26 May 2006 12:39:48 +0000 (12:39 +0000)]
Add str.partition()

18 years agoWhitespace normalization.
Tim Peters [Fri, 26 May 2006 12:31:20 +0000 (12:31 +0000)]
Whitespace normalization.

18 years agoTest cases for off-by-one errors in string split with multicharacter pattern.
Andrew Dalke [Fri, 26 May 2006 12:31:00 +0000 (12:31 +0000)]
Test cases for off-by-one errors in string split with multicharacter pattern.

18 years agoI like tests.
Andrew Dalke [Fri, 26 May 2006 12:28:15 +0000 (12:28 +0000)]
I like tests.

The new split functions use a preallocated list.  Added tests which exceed
the preallocation size, to exercise list appends/resizes.

Also added more edge case tests.

18 years agoWhitespace normalization.
Tim Peters [Fri, 26 May 2006 12:26:21 +0000 (12:26 +0000)]
Whitespace normalization.

18 years ago- Remove previous version of the binary distribution script for OSX
Ronald Oussoren [Fri, 26 May 2006 12:23:20 +0000 (12:23 +0000)]
- Remove previous version of the binary distribution script for OSX
- Some small bugfixes for the IDLE.app wrapper
- Tweaks to build-installer to ensure that python gets build in the right way,
  including sqlite3.
- Updated readme files

18 years agoSupport for buffer protocol for socket and struct.
Martin Blais [Fri, 26 May 2006 12:03:27 +0000 (12:03 +0000)]
Support for buffer protocol for socket and struct.

* Added socket.recv_buf() and socket.recvfrom_buf() methods, that use the buffer
  protocol (send and sendto already did).

* Added struct.pack_to(), that is the corresponding buffer compatible method to
  unpack_from().

* Fixed minor typos in arraymodule.

18 years agoPy_LOCAL shouldn't be used for data; it works for some .NET 2003 compilers,
Fredrik Lundh [Fri, 26 May 2006 12:01:49 +0000 (12:01 +0000)]
Py_LOCAL shouldn't be used for data; it works for some .NET 2003 compilers,
but Trent's copy thinks that it's an anachronism...

18 years agoTypo fixes
Andrew M. Kuchling [Fri, 26 May 2006 12:01:44 +0000 (12:01 +0000)]
Typo fixes

18 years agoneedforspeed: added PY_LOCAL_AGGRESSIVE macro to enable "aggressive"
Fredrik Lundh [Fri, 26 May 2006 11:54:04 +0000 (11:54 +0000)]
needforspeed: added PY_LOCAL_AGGRESSIVE macro to enable "aggressive"
LOCAL inlining; also added some missing whitespace

18 years agoIntegrate installing a framework in the 'make install'
Ronald Oussoren [Fri, 26 May 2006 11:43:26 +0000 (11:43 +0000)]
Integrate installing a framework in the 'make install'
target. Until now users had to use 'make frameworkinstall'
to install python when it is configured with '--enable-framework'.
This tends to confuse users that don't hunt for readme files
hidden in platform specific directories :-)

18 years ago- Search the sqlite specific search directories
Ronald Oussoren [Fri, 26 May 2006 11:38:39 +0000 (11:38 +0000)]
- Search the sqlite specific search directories
  after the normal include directories when looking
  for the version of sqlite to use.
- On OSX:
  * Extract additional include and link directories
    from the CFLAGS and LDFLAGS, if the user has
    bothered to specify them we might as wel use them.
  * Add '-Wl,-search_paths_first' to the extra_link_args
    for readline and sqlite. This makes it possible to
    use a static library to override the system provided
    dynamic library.

18 years agouse Py_LOCAL also for string and unicode objects
Fredrik Lundh [Fri, 26 May 2006 11:38:15 +0000 (11:38 +0000)]
use Py_LOCAL also for string and unicode objects

18 years agowhen generating python code prefer to generate valid python code
Jack Diederich [Fri, 26 May 2006 11:37:20 +0000 (11:37 +0000)]
when generating python code prefer to generate valid python code

18 years agoneedforspeed: added Py_LOCAL macro, based on the LOCAL macro used
Fredrik Lundh [Fri, 26 May 2006 11:29:39 +0000 (11:29 +0000)]
needforspeed: added Py_LOCAL macro, based on the LOCAL macro used
for SRE and others.  applied Py_LOCAL to relevant portion of ceval,
which gives a 1-2% speedup on my machine.  ymmv.

18 years agoAdd "partition" to UserString.
Georg Brandl [Fri, 26 May 2006 11:26:11 +0000 (11:26 +0000)]
Add "partition" to UserString.

18 years agoFix buglet in postinstall script, it would generate an invalid .cshrc file.
Ronald Oussoren [Fri, 26 May 2006 11:17:55 +0000 (11:17 +0000)]
Fix buglet in postinstall script, it would generate an invalid .cshrc file.

18 years agoAdded split whitespace checks for characters other than space.
Andrew Dalke [Fri, 26 May 2006 11:15:22 +0000 (11:15 +0000)]
Added split whitespace checks for characters other than space.

18 years agouse Py_ssize_t in places that may need it
Jack Diederich [Fri, 26 May 2006 11:15:17 +0000 (11:15 +0000)]
use Py_ssize_t in places that may need it

18 years agoAdded a few more test cases for whitespace split. These strings have leading whitespace.
Andrew Dalke [Fri, 26 May 2006 11:11:38 +0000 (11:11 +0000)]
Added a few more test cases for whitespace split.  These strings have leading whitespace.

18 years agoneedforspeed: use Py_ssize_t for the fastsearch counter and skip
Fredrik Lundh [Fri, 26 May 2006 10:27:17 +0000 (10:27 +0000)]
needforspeed: use Py_ssize_t for the fastsearch counter and skip
length (thanks, neal!).  and yes, I've verified that this doesn't
slow things down ;-)

18 years agoneedforspeed: use METH_O for argument handling, which made partition some
Fredrik Lundh [Fri, 26 May 2006 09:46:59 +0000 (09:46 +0000)]
needforspeed: use METH_O for argument handling, which made partition some
~15% faster for the current tests (which is noticable faster than a corre-
sponding find call).  thanks to neal-who-never-sleeps for the tip.

18 years agoClarify docs for str.partition().
Georg Brandl [Fri, 26 May 2006 09:05:54 +0000 (09:05 +0000)]
Clarify docs for str.partition().

18 years agoneedforspeed: partition implementation, part two.
Fredrik Lundh [Fri, 26 May 2006 08:54:28 +0000 (08:54 +0000)]
needforspeed: partition implementation, part two.

feel free to improve the documentation and the docstrings.

18 years agoWithout this patch OSX users couldn't add new help sources because the code
Ronald Oussoren [Fri, 26 May 2006 08:41:25 +0000 (08:41 +0000)]
Without this patch OSX users couldn't add new help sources because the code
tried to update one item in a tuple.

18 years agoAdd Soc student
Andrew M. Kuchling [Fri, 26 May 2006 01:46:22 +0000 (01:46 +0000)]
Add Soc student

18 years agoneedforspeed: partition for 8-bit strings. for some simple tests,
Fredrik Lundh [Thu, 25 May 2006 23:27:53 +0000 (23:27 +0000)]
needforspeed: partition for 8-bit strings.  for some simple tests,
this is on par with a corresponding find, and nearly twice as fast
as split(sep, 1)

full tests, a unicode version, and documentation will follow to-
morrow.

18 years agoPatch #1494387: SVN longobject.c compiler warnings
Tim Peters [Thu, 25 May 2006 22:28:46 +0000 (22:28 +0000)]
Patch #1494387: SVN longobject.c compiler warnings

The SIGCHECK macro defined here has always been bizarre, but
it apparently causes compiler warnings on "Sun Studio 11".
I believe the warnings are bogus, but it doesn't hurt to make
the macro definition saner.

Bugfix candidate (but I'm not going to bother).

18 years agoRepair idiot typo, and complete the job of trying to
Tim Peters [Thu, 25 May 2006 22:25:25 +0000 (22:25 +0000)]
Repair idiot typo, and complete the job of trying to
use the Windows time.clock() implementation on Win64.

18 years agoMove over to use of METH_O and METH_NOARGS.
Brett Cannon [Thu, 25 May 2006 22:00:14 +0000 (22:00 +0000)]
Move over to use of METH_O and METH_NOARGS.

18 years agoAdd missing files from x86 darwin ctypes patch
Bob Ippolito [Thu, 25 May 2006 21:58:05 +0000 (21:58 +0000)]
Add missing files from x86 darwin ctypes patch

18 years agoWhitespace normalization.
Tim Peters [Thu, 25 May 2006 21:52:19 +0000 (21:52 +0000)]
Whitespace normalization.

18 years agoSome Win64 pre-release in 2000 didn't support
Tim Peters [Thu, 25 May 2006 21:50:17 +0000 (21:50 +0000)]
Some Win64 pre-release in 2000 didn't support
QueryPerformanceCounter(), but we believe Win64 does
support it now.  So use in time.clock().

It would be peachy if someone with a Win64 box tried
this ;-)

18 years agoChange test_values so that it compares the lowercasing of group names since getgrall...
Brett Cannon [Thu, 25 May 2006 21:33:11 +0000 (21:33 +0000)]
Change test_values so that it compares the lowercasing of group names since getgrall() can return all lowercase names while getgrgid() returns proper casing.

Discovered on Ubuntu 5.04 (custom).

18 years agoFix minor typo in prep_cif.c
Ronald Oussoren [Thu, 25 May 2006 21:30:54 +0000 (21:30 +0000)]
Fix minor typo in prep_cif.c

18 years agoAdd a x-ref to newer calling APIs.
Georg Brandl [Thu, 25 May 2006 21:11:56 +0000 (21:11 +0000)]
Add a x-ref to newer calling APIs.

18 years agofix test_float regression and 64-bit size mismatch issue
Bob Ippolito [Thu, 25 May 2006 21:09:45 +0000 (21:09 +0000)]
fix test_float regression and 64-bit size mismatch issue

18 years agosquelch gcc4 darwin/x86 compiler warnings
Bob Ippolito [Thu, 25 May 2006 20:52:38 +0000 (20:52 +0000)]
squelch gcc4 darwin/x86 compiler warnings

18 years agoSwap out bare malloc()/free() use for PyMem_MALLOC()/PyMem_FREE() .
Brett Cannon [Thu, 25 May 2006 20:44:08 +0000 (20:44 +0000)]
Swap out bare malloc()/free() use for PyMem_MALLOC()/PyMem_FREE() .

18 years agoSomeone seems to just have copy-pasted the docs of
Georg Brandl [Thu, 25 May 2006 20:28:10 +0000 (20:28 +0000)]
Someone seems to just have copy-pasted the docs of
tp_compare to tp_richcompare ;)

18 years agoenable darwin/x86 support for libffi and hence ctypes (doesn't yet support --enable...
Bob Ippolito [Thu, 25 May 2006 19:59:56 +0000 (19:59 +0000)]
enable darwin/x86 support for libffi and hence ctypes (doesn't yet support --enable-universalsdk)

18 years agoUse faster struct pack/unpack functions for the endian table that matches the host's
Bob Ippolito [Thu, 25 May 2006 19:56:56 +0000 (19:56 +0000)]
Use faster struct pack/unpack functions for the endian table that matches the host's

18 years agoUse LONG_MIN and LONG_MAX to check Python integer bounds instead of the incorrect...
Bob Ippolito [Thu, 25 May 2006 19:33:38 +0000 (19:33 +0000)]
Use LONG_MIN and LONG_MAX to check Python integer bounds instead of the incorrect INT_MIN and INT_MAX

18 years agoneedforspeed: use insert+reverse instead of append
Fredrik Lundh [Thu, 25 May 2006 19:19:05 +0000 (19:19 +0000)]
needforspeed: use insert+reverse instead of append

18 years agoReplace PyObject_CallFunction calls with only object args
Georg Brandl [Thu, 25 May 2006 19:15:31 +0000 (19:15 +0000)]
Replace PyObject_CallFunction calls with only object args
with PyObject_CallFunctionObjArgs, which is 30% faster.

18 years agofix a struct regression where long would be returned for short unsigned integers
Bob Ippolito [Thu, 25 May 2006 19:15:27 +0000 (19:15 +0000)]
fix a struct regression where long would be returned for short unsigned integers

18 years agoFix Cygwin compiler issue
Bob Ippolito [Thu, 25 May 2006 19:03:19 +0000 (19:03 +0000)]
Fix Cygwin compiler issue

18 years ago* eliminate warning by reverting tmp_s type to 'const char*'
Jack Diederich [Thu, 25 May 2006 18:47:15 +0000 (18:47 +0000)]
* eliminate warning by reverting tmp_s type to 'const char*'

18 years agoStruct now unpacks to PY_LONG_LONG directly when possible, also include #ifdef'ed...
Bob Ippolito [Thu, 25 May 2006 18:44:50 +0000 (18:44 +0000)]
Struct now unpacks to PY_LONG_LONG directly when possible, also include #ifdef'ed out code that will return int instead of long when in bounds (not active since it's an API and doc change)

18 years agoneedforspeed: use fastsearch also for find/index and contains. the
Fredrik Lundh [Thu, 25 May 2006 18:44:29 +0000 (18:44 +0000)]
needforspeed: use fastsearch also for find/index and contains.  the
related tests are now about 10x faster.

18 years agoGuard the _active.remove() call to avoid errors when there is no _active list.
Georg Brandl [Thu, 25 May 2006 18:44:09 +0000 (18:44 +0000)]
Guard the _active.remove() call to avoid errors when there is no _active list.

18 years agoFaster path for PyLong_FromLongLong, using PyLong_FromLong algorithm
Bob Ippolito [Thu, 25 May 2006 18:20:23 +0000 (18:20 +0000)]
Faster path for PyLong_FromLongLong, using PyLong_FromLong algorithm

18 years agoAdded overflow test for adding two (very) large strings where the
Andrew Dalke [Thu, 25 May 2006 18:18:39 +0000 (18:18 +0000)]
Added overflow test for adding two (very) large strings where the
new string is over max Py_ssize_t.  I have no way to test it on my
box or any box I have access to.  At least it doesn't break anything.

18 years agoComment typo
Andrew M. Kuchling [Thu, 25 May 2006 18:11:16 +0000 (18:11 +0000)]
Comment typo

18 years agoCode had returned an ssize_t, upcast to long, then converted with PyInt_FromLong.
Andrew Dalke [Thu, 25 May 2006 18:03:25 +0000 (18:03 +0000)]
Code had returned an ssize_t, upcast to long, then converted with PyInt_FromLong.
Now using PyInt_FromSsize_t.

18 years agoneedforspeed: use "fastsearch" for count. this results in a 3x speedup
Fredrik Lundh [Thu, 25 May 2006 17:55:31 +0000 (17:55 +0000)]
needforspeed: use "fastsearch" for count.  this results in a 3x speedup
for the related stringbench tests.

18 years agoFixed problem identified by Georg. The special-case in-place code for replace
Andrew Dalke [Thu, 25 May 2006 17:53:00 +0000 (17:53 +0000)]
Fixed problem identified by Georg.  The special-case in-place code for replace
made a copy of the string using PyString_FromStringAndSize(s, n) and modify
the copied string in-place.  However, 1 (and 0) character strings are shared
from a cache.  This cause "A".replace("A", "a") to change the cached version
of "A" -- used by everyone.

Now may the copy with NULL as the string and do the memcpy manually.  I've
added regression tests to check if this happens in the future.  Perhaps
there should be a PyString_Copy for this case?

18 years agoA new table to help string->integer conversion was added yesterday to
Tim Peters [Thu, 25 May 2006 17:34:03 +0000 (17:34 +0000)]
A new table to help string->integer conversion was added yesterday to
both mystrtoul.c and longobject.c.  Share the table instead.  Also
cut its size by 64 entries (they had been used for an inscrutable
trick originally, but the code no longer tries to use that trick).

18 years agoneedforspeed: new replace implementation by Andrew Dalke. replace is
Fredrik Lundh [Thu, 25 May 2006 17:08:14 +0000 (17:08 +0000)]
needforspeed: new replace implementation by Andrew Dalke.  replace is
now about 3x faster on my machine, for the replace tests from string-
bench.

18 years agoneedforspeed: check for overflow in replace (from Andrew Dalke)
Fredrik Lundh [Thu, 25 May 2006 16:46:54 +0000 (16:46 +0000)]
needforspeed: check for overflow in replace (from Andrew Dalke)

18 years agoFix incorrect documentation for the Py_IS_FINITE(X) macro.
Kristján Valur Jónsson [Thu, 25 May 2006 16:39:27 +0000 (16:39 +0000)]
Fix incorrect documentation for the Py_IS_FINITE(X) macro.

18 years agoFix another typo
Andrew M. Kuchling [Thu, 25 May 2006 16:34:54 +0000 (16:34 +0000)]
Fix another typo

18 years agoAdded tests for implementation error we came up with in the need for speed sprint.
Andrew Dalke [Thu, 25 May 2006 16:30:52 +0000 (16:30 +0000)]
Added tests for implementation error we came up with in the need for speed sprint.

18 years agoFix comment typos
Andrew M. Kuchling [Thu, 25 May 2006 16:23:15 +0000 (16:23 +0000)]
Fix comment typos

18 years agoneedforspeed: _toupper/_tolower is a SUSv2 thing; fall back on ISO C
Fredrik Lundh [Thu, 25 May 2006 16:10:12 +0000 (16:10 +0000)]
needforspeed: _toupper/_tolower is a SUSv2 thing; fall back on ISO C
versions if they're not defined.

18 years agoAdded a new macro, Py_IS_FINITE(X). On windows there is an intrinsic for this and...
Kristján Valur Jónsson [Thu, 25 May 2006 15:53:30 +0000 (15:53 +0000)]
Added a new macro, Py_IS_FINITE(X).  On windows there is an intrinsic for this and it is more efficient than to use !Py_IS_INFINITE(X) && !Py_IS_NAN(X).  No change on other platforms

18 years agoneedforspeed: make new upper/lower work properly for single-character
Fredrik Lundh [Thu, 25 May 2006 15:49:45 +0000 (15:49 +0000)]
needforspeed: make new upper/lower work properly for single-character
strings too... (thanks to georg brandl for spotting the exact problem
faster than anyone else)

18 years agoneedforspeed: speed up upper and lower for 8-bit string objects.
Fredrik Lundh [Thu, 25 May 2006 15:22:03 +0000 (15:22 +0000)]
needforspeed: speed up upper and lower for 8-bit string objects.
(the unicode versions of these are still 2x faster on windows,
though...)

based on work by Andrew Dalke, with tweaks by yours truly.

18 years agoAdd entry; and fix a typo
Andrew M. Kuchling [Thu, 25 May 2006 12:27:59 +0000 (12:27 +0000)]
Add entry; and fix a typo

18 years agoUpdate graminit.c for the fix for #1488915, Multiple dots in relative import
Thomas Wouters [Thu, 25 May 2006 11:26:25 +0000 (11:26 +0000)]
Update graminit.c for the fix for #1488915, Multiple dots in relative import
statement raise SyntaxError, and add testcase.

18 years agoFix #1488915, Multiple dots in relative import statement raise SyntaxError.
Thomas Wouters [Thu, 25 May 2006 11:25:51 +0000 (11:25 +0000)]
Fix #1488915, Multiple dots in relative import statement raise SyntaxError.

18 years agoReplace tab inside comment with space.
Walter Dörwald [Thu, 25 May 2006 08:53:28 +0000 (08:53 +0000)]
Replace tab inside comment with space.

18 years agofix broken links in PDF
Fred Drake [Thu, 25 May 2006 02:42:25 +0000 (02:42 +0000)]
fix broken links in PDF
(SF patch #1281291, contributed by Rory Yorke)

18 years agoMinor edits; add an item
Andrew M. Kuchling [Thu, 25 May 2006 00:23:03 +0000 (00:23 +0000)]
Minor edits; add an item

18 years agoHeavily fiddled variant of patch #1442927: PyLong_FromString optimization.
Tim Peters [Wed, 24 May 2006 21:10:40 +0000 (21:10 +0000)]
Heavily fiddled variant of patch #1442927: PyLong_FromString optimization.

``long(str, base)`` is now up to 6x faster for non-power-of-2 bases.  The
largest speedup is for inputs with about 1000 decimal digits.  Conversion
from non-power-of-2 bases remains quadratic-time in the number of input
digits (it was and remains linear-time for bases 2, 4, 8, 16 and 32).

Speedups at various lengths for decimal inputs, comparing 2.4.3 with
current trunk.  Note that it's actually a bit slower for 1-digit strings:

  len  speedup
 ----  -------
   1     -4.5%
   2      4.6%
   3      8.3%
   4     12.7%
   5     16.9%
   6     28.6%
   7     35.5%
   8     44.3%
   9     46.6%
  10     55.3%
  11     65.7%
  12     77.7%
  13     73.4%
  14     75.3%
  15     85.2%
  16    103.0%
  17     95.1%
  18    112.8%
  19    117.9%
  20    128.3%
  30    174.5%
  40    209.3%
  50    236.3%
  60    254.3%
  70    262.9%
  80    295.8%
  90    297.3%
 100    324.5%
 200    374.6%
 300    403.1%
 400    391.1%
 500    388.7%
 600    440.6%
 700    468.7%
 800    498.0%
 900    507.2%
1000    501.2%
2000    450.2%
3000    463.2%
4000    452.5%
5000    440.6%
6000    439.6%
7000    424.8%
8000    418.1%
9000    417.7%

18 years agoDisable the damn empty-string replace test -- it can't
Tim Peters [Wed, 24 May 2006 21:00:45 +0000 (21:00 +0000)]
Disable the damn empty-string replace test -- it can't
be make to pass now for unicode if it passes for str, or
vice versa.

18 years agoWhitespace normalization.
Tim Peters [Wed, 24 May 2006 20:29:44 +0000 (20:29 +0000)]
Whitespace normalization.

18 years agoWe can't leave the checked-in tests broken.
Tim Peters [Wed, 24 May 2006 20:27:18 +0000 (20:27 +0000)]
We can't leave the checked-in tests broken.

18 years agoAdded a slew of test for string replace, based various corner cases from
Andrew Dalke [Wed, 24 May 2006 18:55:37 +0000 (18:55 +0000)]
Added a slew of test for string replace, based various corner cases from
the Need For Speed sprint coding.  Includes commented out overflow tests
which will be uncommented once the code is fixed.

This test will break the 8-bit string tests because
    "".replace("", "A") == "" when it should == "A"

We have a fix for it, which should be added tomorrow.