Commit Graph

39 Commits

Author SHA1 Message Date
Raymond Hettinger
dbecd93b72 Replace list of constants with tuples of constants. 2005-02-06 06:57:08 +00:00
Raymond Hettinger
a617271dbd Use cStringIO where available. 2004-12-31 19:15:26 +00:00
Walter Dörwald
70a6b49821 Replace backticks with repr() or "%r"
From SF patch #852334.
2004-02-12 17:35:32 +00:00
Raymond Hettinger
85c20a41df Implement and apply PEP 322, reverse iteration 2003-11-06 14:06:48 +00:00
Guido van Rossum
68468eba63 Get rid of many apply() calls. 2003-02-27 20:14:51 +00:00
Raymond Hettinger
88f72ff955 Replace .keys() with .iteritems(). Second review and test by Alex. 2002-06-04 02:17:04 +00:00
Michael W. Hudson
1ccccc08c2 Make test_mhlib run again.
There's some wierdness here, but the test ran before and not after,
so I'm just hacking the change out.  Someone more motivated than
me can work out what's really happening.

Raymond: *PLEASE* run the test suite before checking things like
this in!
2002-06-02 16:12:06 +00:00
Raymond Hettinger
32200aeac6 Replaced obsolete stat module constants with equivalent attributes 2002-06-01 19:51:15 +00:00
Raymond Hettinger
16e3c427f3 Replace boolean test with is None. 2002-06-01 16:07:16 +00:00
Raymond Hettinger
54f0222547 SF 563203. Replaced 'has_key()' with 'in'. 2002-06-01 14:18:47 +00:00
Tim Peters
bc0e910826 Convert a pile of obvious "yes/no" functions to return bool. 2002-04-04 22:55:58 +00:00
Guido van Rossum
f93befc209 Folder.getlast(): avoid PyChecker warning. 2001-10-17 05:59:26 +00:00
unknown
3db163aa19 Clean up a bare except: clause. 2001-07-04 07:01:29 +00:00
Eric S. Raymond
6e025bcde8 String method cleanup. 2001-02-10 00:22:33 +00:00
Eric S. Raymond
c9838f9fcb Test with an actual mbox caught a trivial error. 2001-02-09 10:28:34 +00:00
Eric S. Raymond
66d9919cab String method conversion. 2001-02-09 09:19:27 +00:00
Skip Montanaro
17ab123cf1 a few more modules get __all__ 2001-01-24 06:27:27 +00:00
Fred Drake
8152d32375 Update the code to better reflect recommended style:
Use != instead of <> since <> is documented as "obsolescent".
Use "is" and "is not" when comparing with None or type objects.
2000-12-12 23:20:45 +00:00
Thomas Wouters
7e47402264 Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in either
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 ;)
2000-07-16 12:04:32 +00:00
Fred Drake
ffdc48f45c Convert to use class-based exceptions.
Correct exception information in one docstring.
2000-06-29 05:06:02 +00:00
Guido van Rossum
54f22ed30b More trivial comment -> docstring transformations by Ka-Ping Yee,
who writes:

Here is batch 2, as a big collection of CVS context diffs.
Along with moving comments into docstrings, i've added a
couple of missing docstrings and attempted to make sure more
module docstrings begin with a one-line summary.

I did not add docstrings to the methods in profile.py for
fear of upsetting any careful optimizations there, though
i did move class documentation into class docstrings.

The convention i'm using is to leave credits/version/copyright
type of stuff in # comments, and move the rest of the descriptive
stuff about module usage into module docstrings.  Hope this is
okay.
2000-02-04 15:10:34 +00:00
Guido van Rossum
4fe6caaaf0 Patch by Lars Wirzenius:
o the initial comment is wrong: creating messages is already
	  implemented

	o Message.getbodytext: if the mail or it's part contains an
	  empty content-transfer-encoding header, the code used to
	  break; the change below treats an empty encoding value the same
	  as the other types that do not need decoding

	o SubMessage.getbodytext was missing the decode argument; the
	  change below adds it; I also made it unconditionally return
	  the raw text if decoding was not desired, because my own
	  routines needed that (and it was easier than rewriting my
	  own routines ;-)
1999-02-24 16:25:17 +00:00
Guido van Rossum
d9d2625dbd "if match(x) >= 0:" smells of regex matching; should use "if match(x):" 1998-06-23 14:43:06 +00:00
Guido van Rossum
45e2fbc2e7 Mass check-in after untabifying all files that need it. 1998-03-26 21:13:24 +00:00
Guido van Rossum
00f9fea288 Use string.replace instead of regsub.[g]sub. 1997-12-24 21:18:41 +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
f15d15964b Use sys.exc_info() where needed. 1997-09-29 23:22:12 +00:00
Guido van Rossum
4e5cbcf5af Added createmessage() -- Lars Wirzenius. 1997-07-25 14:59:10 +00:00
Guido van Rossum
0c5e049c75 Reindented with 4 spaces. 1997-04-16 02:47:12 +00:00
Guido van Rossum
7cfd31ee8a Rewrite parsesequence() to emulate MH without invoking pick.
Test it extensively by using pick.
1997-04-16 02:45:08 +00:00
Guido van Rossum
659a3b5881 Optimized the hell out of listmessages().
Changed numericprog regexpr to make it faster to check.
Removed now unnecessary checks for os.curdir, os.pardir.
1997-04-02 01:18:30 +00:00
Guido van Rossum
3508d60f99 When removing a messge from all sequences, don't remove from 'cur',
which needs to stay unless explicitly set.
1996-11-12 04:15:47 +00:00
Guido van Rossum
6d6a15bab2 Added option to refilemessages() to keep sequences 1996-07-21 02:18:22 +00:00
Guido van Rossum
508a092e2e added setcontext and parsesequence; several small fixes 1996-05-28 22:59:37 +00:00
Guido van Rossum
ea8ee1dfc5 fix bogus test for regex match 1995-01-26 00:45:20 +00:00
Guido van Rossum
40b2cfb3f3 * Lib/mhlib.py: added movemessage(), copymessage(), added copy
fallback for refilemessages(), and updated the docs
1995-01-02 18:38:23 +00:00
Guido van Rossum
853474194f mhlib.py: delay opening of sequences file so we don't overwrite it when
putsequences is called with a bad argument
rfc822.py: better handling of dates with no or bad timezones
uu.py: contributed by Lance -- uu{en,de}code
1994-09-09 11:10:15 +00:00
Guido van Rossum
5f47e5752a * Lib/mhlib.py (removefromallsequences): call putsequences with
proper argument

	* Lib/{bdb,cmd,pdb}.py: Mods by Rickard Westman: No longer barfs
	on lambda:s (outputs "<lambda>" as the function name); "a(rgs)" in
	pdb now works; help messages added to pdb (lifted from pdb.doc).
	Also, "h pdb" calls pdb.help().  cmd.do_help() displays topics on
	a nicer way (I think).  Also, topics for which there is a help_
	method, but no do_method (like "pdb" above) are displayed in a
	special way.  My own mod: fix break on function to also support
	methods.
1994-07-14 14:01:00 +00:00
Guido van Rossum
560131328c mhlib.py: new interface to MH folders and messages
multifile.py: added readlines() and read() methods
mimetools.py: mimetools.py: added functions to encode/decode standard MIME
	Content-transfer-encoding types (as well as uuencode)
rfc822.py: Accept lines ending in CR LF as well
1994-06-23 12:06:02 +00:00