0
0
mirror of https://github.com/python/cpython.git synced 2024-12-01 03:01:36 +01:00
Commit Graph

1306 Commits

Author SHA1 Message Date
Guido van Rossum
e8d113976c Add empty __init__.py files to the test packages so the new policy
will recognize them.
1997-10-31 18:33:41 +00:00
Guido van Rossum
613418aa09 New version from Sjoerd, small bugfix + optimizations. 1997-10-30 15:27:37 +00:00
Guido van Rossum
0874f7fdaf Tests for tokenize.py (Ka-Ping Yee) 1997-10-27 22:15:06 +00:00
Guido van Rossum
fefc922cef New, fixed version with proper r"..." and R"..." support from Ka-Ping. 1997-10-27 21:17:24 +00:00
Guido van Rossum
3b631775b2 Redone (by Ka-Ping) using the new re module, and adding recognition
for r"..." raw strings.  (And R"..." string support added by Guido.)
1997-10-27 20:44:15 +00:00
Guido van Rossum
036309b13e This should hopefully finally clean up the remaining __del__ related
problems with this module, even if an instance of a derived class is
kept alive longer than the urllib module itself...
1997-10-27 18:56:19 +00:00
Guido van Rossum
af8d2bf4d8 Bugfix in match() -- the number of registers shouldn't be divided by two! 1997-10-27 18:17:19 +00:00
Guido van Rossum
e6eef4b4a3 Use __dict__.update(state) instead of for loop over state.items() and
call to setattr().  This changes semantics, following the change
already implemented in pickle.

Also reindented a few lines properly.
1997-10-26 17:00:25 +00:00
Guido van Rossum
31626bce66 re -> regex conversions by Sjoerd. 1997-10-24 14:46:16 +00:00
Guido van Rossum
f81e5b9c78 New module -- converts regex regular expressions to re style.
There are two ways to use this -- as a filter (e.g. using C-U M-| on a
regex string literal in an Emacs buffer) or from a Python program
which imports this as a module.  Read the doc string for more info,
and also some caveats (some cases aren't handled right).
1997-10-23 22:43:50 +00:00
Guido van Rossum
1fef181183 Although it's hard to be sure, I *think* this is a working conversion
from regex to re style regular expressions.  This should make sgmllib
and htmllib threadsafe, so I can now create a threaded version of
webchecker...
1997-10-23 19:09:21 +00:00
Guido van Rossum
57a68e08f9 Remove redundant import regsub. 1997-10-23 17:50:10 +00:00
Guido van Rossum
9694fcab53 Convert all remaining *simple* cases of regex usage to re usage. 1997-10-22 21:00:49 +00:00
Guido van Rossum
426916e50e Add pcre to the list of safe modules. 1997-10-22 20:56:32 +00:00
Guido van Rossum
f7a8b45d71 Remove outdated comments. 1997-10-22 20:54:50 +00:00
Guido van Rossum
12f86ade21 Removed some unneeded imports, moved others around. 1997-10-22 20:52:53 +00:00
Guido van Rossum
a8832b45e7 Removed unneeded imports of regex and regsub. 1997-10-22 20:50:37 +00:00
Guido van Rossum
acfb82a530 Use re instead of regex. Also remove bogus return statement from __init__(). 1997-10-22 20:49:52 +00:00
Guido van Rossum
8566e474b4 Added pgrep() function, which is like grep/egrep/emgrep but uses Perl
syntax, by virtue of the new re module.
1997-10-22 20:44:58 +00:00
Guido van Rossum
b49144244c Deleted this long-obsolete module 1997-10-22 16:29:53 +00:00
Guido van Rossum
24986204cf Added "new" symbol defns for RE_ANSI_HEX and RE_NO_GNU_EXTENSIONS --
hopefully the last maintenance on this module, ever.
1997-10-22 16:28:53 +00:00
Guido van Rossum
4e8ef5fcd3 Catch KeyboardInterrupt separately and propagate it, instead of
reporting a "crash".

Use sys.exc_info() instead of sys.exc_type and sys.exc_value.
1997-10-20 23:46:54 +00:00
Guido van Rossum
1510565cb5 Add optional 4th argument to count(), matching find() etc.
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).
1997-10-20 23:31:15 +00:00
Guido van Rossum
dd65975ac7 Patch by Charles G. Waldman to add optional user and password
arguments to NNTP.__init__(), for nntp servers that need them.
1997-10-20 23:29:44 +00:00
Guido van Rossum
7eecc246a7 Remove .pyo files like .pyc files. 1997-10-20 23:16:58 +00:00
Guido van Rossum
fb5cef1160 Added separate tests for {}.get(). 1997-10-20 20:10:43 +00:00
Barry Warsaw
9b887c7911 Added tests of dict.get() 1997-10-20 17:34:43 +00:00
Fred Drake
654451dc54 splitpasswd(): The parameter is named "user", not "host". 1997-10-14 13:30:57 +00:00
Guido van Rossum
2861f4ec6e Open files in binary mode (Jack) 1997-10-08 15:23:23 +00:00
Guido van Rossum
cbf3dd53b4 Use better timer on the mac
Open files in binary mode
(Jack)
1997-10-08 15:23:02 +00:00
Guido van Rossum
45ac47c0b2 Allow open file as parameter (must be seekable) (Jack) 1997-10-08 15:22:32 +00:00
Guido van Rossum
9ec2ed466b Change test for re.sub() involving g<...> to use a multi-character
identifier.  The previous re.py had a bug that wouldn't show up with
single-char identifier...
1997-10-08 04:05:08 +00:00
Guido van Rossum
5bc5b14f6d Checking in AMK's latest installement. 1997-10-08 02:08:04 +00:00
Guido van Rossum
d2c0ec78d2 Use ... around binary strings. 1997-10-07 21:22:48 +00:00
Fred Drake
53ad776cbf Remove this pathetic little module! 1997-10-07 18:12:20 +00:00
Guido van Rossum
c6e8fd6de7 Temporary fix to valid_identifier(). 1997-10-07 14:51:18 +00:00
Guido van Rossum
2f3941d743 Return the error code from most commands, rather than swallowing it.
Adapted the example (lying slightly about the string printed by
login()).
1997-10-07 14:49:56 +00:00
Guido van Rossum
ae590db3ce Fix join to support multiple arguments.
(Why isn't this file identical to ntpath.py?)
1997-10-07 14:48:23 +00:00
Guido van Rossum
abfdd70665 Add XXX note about wanting support for copy_reg.py... 1997-10-07 14:47:50 +00:00
Guido van Rossum
90981e0e70 Add Jeff Epler's interact() function. Note that it is broken.
(It should probably be withdrawn :-( )
1997-10-07 14:47:24 +00:00
Guido van Rossum
d5484fb75c Add optional arguments lo and hi to insort() and bisect(), to support
using arrays containing leading or trailing garbage.
1997-10-07 14:45:49 +00:00
Fred Drake
e3dbc7e422 Reduced number of temporary names used at module scope. Use underscores in
front of temporary names in the module namespace.
1997-10-06 21:28:04 +00:00
Fred Drake
dc1a072e02 Reduced number of temporary names used at module scope. Use underscores in
front of temporary names in the module namespace.
1997-10-06 21:06:29 +00:00
Fred Drake
923c4eeeef Don't do weird things with the "import parser"; just do it. Sheesh... 1997-10-06 20:56:43 +00:00
Guido van Rossum
a11ccccd24 The usual (and some new modules). 1997-10-06 20:19:59 +00:00
Barry Warsaw
fc3e61cd28 UserDict.get(): New method to mirror built-in dictionaries' get()
method.
1997-10-06 17:50:04 +00:00
Fred Drake
596db3161c Move the __getitem__() definition from StandardException to Exception.
This allows stuff like this out of the box:

	try:
	    ...
	except socket.error, (code, msg):
	    ...
1997-10-06 15:48:20 +00:00
Guido van Rossum
bf9d353bab New "re" regular expression support.
The new re module was written by Andrew Kuchling and uses the pcre
code in ../Modules/.  The old re module has been renamed to re1,
just in case you need it for comparison.
1997-10-06 14:45:17 +00:00
Guido van Rossum
6af6d3511e Turns out whatsound.py and sndhdr.py were identical modules.
Since there's also an imghdr.py file, I propose to make sndhdr.py the
official one.  For compatibility, whatsound.py imports * from
sndhdr.py.
1997-10-04 20:29:17 +00:00
Guido van Rossum
f1b0009a78 Fix path search for test data file so it works under more circumstances. 1997-10-01 22:10:32 +00:00