| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
of the remainder item (last item in list) when maxsplit is < the
number of occurrences.
|
|
|
|
|
|
|
|
| |
maxsplit which is implemented in string.py but wasn't here. The
reference manual doesn't define what happens when maxsplit is negative
or larger than the number of occurrences, but in either case, I
implemented this as all get replaced. Default value is zero which
replaces all occurrences.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Two new modules fpectl and fpetest.
Surround various and sundry f.p. operations with PyFPE_*_PROTECT macros.
|
|
|
|
|
|
| |
other sequences use the Sequence protocol from the abstract API. The
algorithm has changed so that only one pass through the sequences are
made.
|
|
|
|
|
|
|
|
|
|
|
|
| |
- 'delete' is a C++ keyword; use 'del_table' instead
- apply Py_CHARMASK() to del_table[i] before using it as an index
*** this fixes a bug that was just reported on the list ***
- if the translation didn't make any changes, INCREF and return
the original string
- when del_table is empty or omitted, don't copy the translation
table to a table of ints (should be a bit faster)
Rewrote maketrans() to avoid copying the table (2-3% faster).
|
|
|
|
|
|
|
| |
performance hit. Urg. Reverted.
strop_joinfields(): re-instate optimizations for lists and tuples, but
support arbitrary other kinds of sequences as well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- split_whitespace(): slightly better memory ref handling when errors
occur.
- strop_joinfields(): First argument can now be any sequence-protocol
conformant object.
- strop_find(), strop_rfind(): Use PyArg_ParseTuple for optional
arguments
- strop_lower(), strop_upper(): Factor logic into a common function
do_casechange().
- strop_atoi(), strop_atol(): Use PyArg_ParseTuple.
- strop_maketrans(): arguments used to be optional, although the
documentation doesn't reflect this. Make the source conform to the
docs. Arguments are required, but two empty strings will return the
identity translation table.
- General pass fixing up formatting, and checking for return values.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
embedded \0 in the delimiter is handled properly. Thanks to Sjoerd
for suggesting this.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Extended split() (and hence splitfields(), which is the same function)
to support an optional third parameter giving the maximum number of
delimiters to parse.
|
|
|
|
| |
Added maketrans(), a utility to create a translation table.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Setup.in: clarified Tk comments somewhat.
structmodule.c: use memcpy() instead of double precision assignment.
|
|
|
|
| |
renaming hacks
|
|
|
|
|
| |
index/rindex (raising and catching an exception is much more
expensive than returning and testing -1)
|
|
|
|
|
|
|
|
|
|
| |
shorter names (dropped the "module" from the name): sunaudiodev,
imgformat, audioop, imageop, imgfile
* Modules/stropmodule.c (strop_rindex): make rindex('abc', '') do
the right thing (i.e. return 3 instead of 0)
* Modules/socketmodule.c: disabled allowbroadcast() socket method
|
| |
|
| |
|
|
|
|
| |
as normal indexing does.
|
|
|
|
| |
cstubs: Use Matrix type instead of float[4][4].
|
| |
|
|
|
|
|
|
|
| |
* timemodule.c: change #ifdef TURBO_C into #ifdef MSDOS
* posixmodule.c: MSDOS changes by Marcel van der Peijl (Digicash)
* stropmodule.c: use C isspace(c) to test for whitespace; add
whitespace, lowercase and uppercase variables to the module.
|
|
|
|
| |
whitespace variable to module dict.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Stubs for faster implementation of local variables (not yet finished)
* Added function name to code object. Print it for code and function
objects. THIS MAKES THE .PYC FILE FORMAT INCOMPATIBLE (the version
number has changed accordingly)
* Print address of self for built-in methods
* New internal functions getattro and setattro (getattr/setattr with
string object arg)
* Replaced "dictobject" with more powerful "mappingobject"
* New per-type functio tp_hash to implement arbitrary object hashing,
and hashobject() to interface to it
* Added built-in functions hash(v) and hasattr(v, 'name')
* classobject: made some functions static that accidentally weren't;
added __hash__ special instance method to implement hash()
* Added proper comparison for built-in methods and functions
|
|
|
|
|
|
|
|
|
| |
* Makefile: change default source directory
* socketmodule.c: added getsockname and getpeername
* bltinmodule.c: corrected typo in type() error message
* Added new built-in functions str() and repr(): repr(x) == `x`;
str(x) == x if x is a string, otherwise str(x) == repr(x).
* Added joinfields to stropmodule.c (string.join calls joinfields now)
|
|
|
|
| |
lower, upper and swapcase to strop; cosmetics.
|
|
|