summaryrefslogtreecommitdiffstats
path: root/Lib/stringold.py
Commit message (Collapse)AuthorAgeFilesLines
* Remove old string moduleNeal Norwitz2007-04-171-426/+0
|
* Rip out 'long' and 'L'-suffixed integer literals.Guido van Rossum2007-01-151-1/+1
| | | | (Rough first cut.)
* More apply() cleanupNeal Norwitz2006-03-171-10/+7
|
* Remove outdated references to the regsub module.Raymond Hettinger2004-12-071-1/+0
|
* Replace backticks with repr() or "%r"Walter Dörwald2004-02-121-1/+1
| | | | From SF patch #852334.
* Nuke accurate but confusing and unhelpful comments about split vs splitfields.Tim Peters2001-02-091-1/+0
|
* String method conversion.Eric S. Raymond2001-02-091-1/+1
|
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-161-1/+1
| | | | | | | | | | comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
* Untabify to pass the -tt test.Fred Drake2000-02-101-28/+28
|
* Mainlining the string_methods branch. See branch revision logBarry Warsaw1999-10-121-430/+275
| | | | messages for specific changes.
* As Tim Peters points out, ``from string import *'' should not set re to None.Guido van Rossum1998-04-201-9/+11
| | | | Also rename safe_env to _safe_env.
* Strip argument to atol and atof to match what strop does better.Guido van Rossum1998-03-301-2/+2
|
* A few lines were indented using spaces instead of tabs -- fix them.Guido van Rossum1998-03-261-4/+5
|
* Minor editing corrections.Guido van Rossum1997-12-291-13/+13
|
* Added doc string, provided by Charles Waldman (with some reformattingGuido van Rossum1997-12-291-0/+223
| | | | and a little editing my me).
* At Barry's suggestion, plug the security leak by using an emptyGuido van Rossum1997-12-101-3/+6
| | | | | | __builtins__ for all calls to eval(). This still allows someone to write string.atof("[1]*1000000") (which Jim Fulton worries about) but effectively disables access to system modules and functions.
* Since this module is used as a fallback in case no built-in modulesGuido van Rossum1997-12-101-3/+7
| | | | | | | | | have been configured, string.atof() should not fail when "import re" fails (usually because pcre is not there). This opens up a tiny security hole: *if* an attacker can make "import re" fail, they can also make string.atof(arbitrary_string) evaluate the arbitrary string. Nothing to keep me awake at night...
* In string.split(), honor maxsplit (if > 0).Guido van Rossum1997-12-011-2/+8
| | | | | | | | In string.splitfields(), ignore maxsplit if <= 0, rather than ignoring maxsplit=0 but effectively treating negative numbers the same as maxsplit=1. Also made the test for maxsplit slightly more efficient (set it to the length of the string when <= 0 so the test for its presence can be omitted from the loop).
* Convert all remaining *simple* cases of regex usage to re usage.Guido van Rossum1997-10-221-3/+6
|
* Add optional 4th argument to count(), matching find() etc.Guido van Rossum1997-10-201-7/+14
| | | | | | Also change all occurrences of "x == None" to "x is None" (not that it matters much, these functions are all reimplemented in strop -- but count() is not).
* Changed my mind on replace().Guido van Rossum1997-04-021-12/+2
| | | | | | It's now replace(str, old, new, maxsplit=0). Note new ordering of parameters (string first); this is more consistent with translate().
* Added new functions replace() and replace1().Guido van Rossum1997-03-251-0/+15
|
* Add optional 4th argument to [r]find and [r]index (end of slice).Guido van Rossum1997-03-141-10/+26
|
* Use correct separator for capwords(s, sep).Guido van Rossum1996-08-261-1/+1
|
* Add optional separator character to capwords(), for completeness.Guido van Rossum1996-08-201-2/+2
|
* Add optional third parameter to split() and splitfields(), giving theGuido van Rossum1996-08-081-4/+22
| | | | | maximum number of delimiters to parse; e.g. splitfields("a,b,c,d", ",", 2) -> ["a", "b", "c,d"].
* Added 3rd optional argument to translate(), a string of characters to delete.Guido van Rossum1996-07-231-9/+23
| | | | Added maketrans(), a utility to create a translation table.
* Added capitalize() and capwords().Guido van Rossum1996-06-111-0/+10
|
* add translate() -- which was in strop per release 1.3Guido van Rossum1996-05-281-0/+8
|
* default tabsize to 8Guido van Rossum1995-08-101-1/+1
|
* make split and splitfields, join and joinfields synonymsGuido van Rossum1995-06-221-6/+8
|
* add dummy base to atoi/atol; careful about negative start indices in find/countGuido van Rossum1995-03-141-5/+11
|
* * Lib/string.py: find/rfind is now the main implementation andGuido van Rossum1994-08-171-63/+41
| | | | | index/rindex is a wrapper that raises index_error (which is now always ValueError)
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-24/+51
|
* * string.py: added rindex(), rfind(); changed index() to interpretGuido van Rossum1993-11-081-0/+27
| | | | | | | | | | | negative start indices starting from the right. * ftplib.py: debug() -> set_debuglevel(); change demo to use __init__(). * os.py: added execl, execlp, and execvp. * lambda.py: removed (now that we have built-in map, reduce, bagof, lambda) * test_b{1,2}.py, testall.out: added tests for bagof, lambda, map, reduce * commands.py: use os, not posix * test_grammar.py: make it easy to disable non-portable int overflow tests * dis.py: don't abuse range()
* * profile.py, pdb.py: added help() functionGuido van Rossum1993-10-221-1/+33
| | | | | | * builtin.py: b/w compat for builtin -> __builtin__ name change * string.py: added atof() and atol() and corresponding exceptions * test_types.py: added test for list sort with user comparison function
* * pdb.py: set 'privileged' property when evaluating expressionsGuido van Rossum1993-07-291-1/+4
| | | | | * string.py: change whitespace to include \r, \v and \f. When importing strop succeeds, re-evaluate meaning of letters.
* * ftplib.py: added abort() command (sends oob data).Guido van Rossum1993-05-241-2/+9
| | | | | | * Several modules: change "class C(): ..." to "class C: ...". * flp.py: support for frozen forms. * Added string.find() which is like index but returns -1 if not found
* * Fix bug in tzparse.py for DST timezoneGuido van Rossum1993-03-291-1/+3
| | | | | | | * Added whatis command to pdb.py * new module GET.py (GL definitions from <gl/get.h>) * rect.py: is_empty takes a rect as argument, not two points. * Added tests for builtin round() [XXX not yet complete!]
* * mainloop.py: added facility for calling select(). Also addedGuido van Rossum1992-11-261-4/+1
| | | | | | | | embryonic facility for pseudo-modal dialogs. * stdwinevents.py: added modifier masks for key/mouse events * renamed exceptions in nntplib.py * Changed string.join() to call string.joinfields() to profit of strop.joinfields()
* * change default line numbers for 'list' in pdb.pyGuido van Rossum1992-11-051-3/+11
| | | | | | | | | * changed eval() into getattr() in cmd.py * added dirname(), basename() and (dummy) normath() to macpath.py * renamed nntp.py to nntplib.py * Made string.index() compatible with strop.index() * Make string.atoi('') raise string.atoi_error rather than ValueError * Added dirname() and normpath() to posixpath.
* Misc changes and new modules. whrandom is "objectified". SOCKET.pyGuido van Rossum1992-10-181-0/+12
| | | | is moved to the sgi subdirectory.
* New module regsub contains sub(), gsub() and split() as in nawk.Guido van Rossum1992-09-201-3/+2
| | | | | string.splitfields(s, '') now returns [s] as split() in nawk. Added _exit to exported functions of os.
* splitfields(s, '') is illegalGuido van Rossum1992-08-191-1/+5
|
* Removed *.libs (now in ./sgi);Guido van Rossum1992-08-061-2/+6
| | | | | added gettext() method to TextEdit.py; fixed string.atoi() to ignore leading zeros.
* Add function to expand tabs.Guido van Rossum1992-03-271-0/+13
|
* New implementation method for case conversion.Guido van Rossum1992-01-141-10/+8
|
* New == syntaxGuido van Rossum1992-01-011-4/+4
|
* A plus is also a sign!Guido van Rossum1991-08-161-2/+2
|
* Added join() and joinfields() functions.Guido van Rossum1991-04-071-9/+27
| | | | | Fixed center(). Rewrote ljust() and rjust().