| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
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 ;)
|
| |
|
|
|
|
| |
messages for specific changes.
|
|
|
|
| |
Also rename safe_env to _safe_env.
|
| |
|
| |
|
| |
|
|
|
|
| |
and a little editing my me).
|
|
|
|
|
|
| |
__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.
|
|
|
|
|
|
|
|
|
| |
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.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).
|
| |
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
| |
It's now replace(str, old, new, maxsplit=0).
Note new ordering of parameters (string first);
this is more consistent with translate().
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
maximum number of delimiters to parse; e.g.
splitfields("a,b,c,d", ",", 2) -> ["a", "b", "c,d"].
|
|
|
|
| |
Added maketrans(), a utility to create a translation table.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
index/rindex is a wrapper that raises index_error (which is now
always ValueError)
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
| |
* string.py: change whitespace to include \r, \v and \f.
When importing strop succeeds, re-evaluate meaning of letters.
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
| |
* 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!]
|
|
|
|
|
|
|
|
| |
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()
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
is moved to the sgi subdirectory.
|
|
|
|
|
| |
string.splitfields(s, '') now returns [s] as split() in nawk.
Added _exit to exported functions of os.
|
| |
|
|
|
|
|
| |
added gettext() method to TextEdit.py;
fixed string.atoi() to ignore leading zeros.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Fixed center().
Rewrote ljust() and rjust().
|
| |
|
|
|