Walter Dörwald
0a6d0ff8d9
Port the dictionary tests from test_types.py to unittest. Collect as much
...
mapping tests as possible in mapping_test.py and reuse the tests in
test_dict.py, test_userdict.py, test_weakref.py, test_os.py and test_shelve.py.
From SF patch #736962 .
2004-05-31 16:29:04 +00:00
Walter Dörwald
cbd0b365c1
Fix typo (from SF bug #962602 )
2004-05-31 15:12:27 +00:00
Raymond Hettinger
874ebd5c3d
Add weakref support to sockets and re pattern objects.
2004-05-31 03:15:02 +00:00
Raymond Hettinger
027bb633b6
Add weakref support to sockets and re pattern objects.
2004-05-31 03:09:25 +00:00
Raymond Hettinger
cb87bc8e7e
Add weakref support to array.array and file objects.
2004-05-31 00:35:52 +00:00
Raymond Hettinger
691d80532b
Make sets and deques weak referencable.
2004-05-30 07:26:47 +00:00
Walter Dörwald
d70ad8a9d9
Update docstring for dict.update() to match the new realities.
2004-05-28 20:59:21 +00:00
Fred Drake
8759090562
starting to add comments to explain what's here
2004-05-28 20:21:36 +00:00
Walter Dörwald
80ce6dd564
The default argument in dict.setdefault() defaults to None.
...
Add this default to weakref.WeakValueDictionary.setdefault()
and weakref.WeakKeyDictionary.setdefault() too.
2004-05-27 18:16:25 +00:00
Walter Dörwald
c139909611
The default argument in dict.setdefault() defaults to None.
...
Add this default to UserDict.DictMixin.setdefault() too.
2004-05-27 09:41:04 +00:00
Michael W. Hudson
08678a1055
Remove float_compare as per
...
[ 899109 ] 1==float('nan')
which can now finally be closed, I think.
2004-05-26 17:36:12 +00:00
Michael W. Hudson
76b8cc84a4
Band-aid type fix for
...
[ 728330 ] Don't define _SGAPI on IRIX
The Right Thing would be nice, for now this'll do. At least it isn't
going to break anything *other* than IRIX...
2004-05-26 17:06:31 +00:00
Raymond Hettinger
4ccf336e56
Fill-in the introductory paragraph for the library tour.
2004-05-26 13:57:54 +00:00
Raymond Hettinger
846865bba6
Add a further tour of the standard library.
2004-05-26 13:52:59 +00:00
Raymond Hettinger
a8aebcedf9
Follow official recommendation for domain names in examples.
2004-05-25 16:08:28 +00:00
Skip Montanaro
79cddc56b3
stupid, stupid, stupid... raw_input() already supports readline() if the
...
readline module is loaded.
2004-05-24 14:20:16 +00:00
Skip Montanaro
b98a8ba14d
Add example that uses readline.readline().
2004-05-23 19:06:41 +00:00
Skip Montanaro
0dc23101a0
Exposed readline() function from the readline module.
2004-05-23 17:46:50 +00:00
Raymond Hettinger
ddc819c964
Make sure sets are printed in sorted order
2004-05-22 19:37:21 +00:00
Raymond Hettinger
e36894da3a
Updated to reflect new types.
2004-05-22 16:38:11 +00:00
Raymond Hettinger
1453e4aa75
* teach repr.repr() about collections.deque()
...
* rename a variable for clarity
2004-05-21 23:01:18 +00:00
Raymond Hettinger
ba6cd3647f
* Updated repr.py to handle set() and frozenset().
...
* Factored out common code to a single private function.
* Use str.join() instead of + concatenation
* Loop over elements directly instead of using indexing
* Use % operator for formatting
2004-05-21 10:00:15 +00:00
Raymond Hettinger
83ee79524a
Add a test to verify an early call to iter() on the outermost for
...
expression.
2004-05-20 23:04:13 +00:00
Raymond Hettinger
956e4f792f
Clarify when iter() is first called in generator expressions.
2004-05-20 22:59:26 +00:00
Piers Lauder
8bc81fc5c7
Added description for authenticate and namespace
2004-05-20 12:12:58 +00:00
Piers Lauder
c1e32b6518
Fixed IMAP4_SSL read bug introduced by patch 956394
2004-05-20 11:32:35 +00:00
Piers Lauder
8f2b24401e
Fixed IMAP4_SSL read and readlines code per patch 956394
2004-05-20 01:16:14 +00:00
Raymond Hettinger
6e1fd2f208
Improved wording for generator expressions.
2004-05-19 22:30:25 +00:00
Raymond Hettinger
059e170c1d
SF bug #949329 : sets.Set() --> set()
2004-05-19 19:56:44 +00:00
Raymond Hettinger
170a62221c
Add more docs for generator expressions.
...
* Put in a brief, example driven tutorial entry.
* Use better examples in whatsnew24.tex.
2004-05-19 19:45:19 +00:00
Armin Rigo
ba91b9fdda
Applying SF patch #949329 on behalf of Raymond Hettinger.
2004-05-19 19:10:18 +00:00
Andrew M. Kuchling
16581c8614
Set data pointer to NULL after an error; this keeps the mmap_dealloc() function from trying to do msync(-1);munmap(-1).
...
2.3 bugfix candidate, but this bug isn't critical enough that the fix has to go into 2.3.4
2004-05-19 14:39:08 +00:00
Raymond Hettinger
354433a59d
SF patch #872326 : Generator expression implementation
...
(Code contributed by Jiwon Seo.)
The documentation portion of the patch is being re-worked and will be
checked-in soon. Likewise, PEP 289 will be updated to reflect Guido's
rationale for the design decisions on binding behavior (as described in
in his patch comments and in discussions on python-dev).
The test file, test_genexps.py, is written in doctest format and is
meant to exercise all aspects of the the patch. Further additions are
welcome from everyone. Please stress test this new feature as much as
possible before the alpha release.
2004-05-19 08:20:33 +00:00
Raymond Hettinger
285cfccecb
Make type check work with subclasses
2004-05-18 18:15:03 +00:00
Fred Drake
9f15b5c11c
add some notes about the changes to ConfigParser
2004-05-18 04:30:00 +00:00
Fred Drake
82903148a8
ConfigParser:
...
- read() method returns a list of files parsed successfully
- add tests, documentation
(closes SF patch #677651 )
2004-05-18 04:24:02 +00:00
Fred Drake
b4c6091984
ConfigParser:
...
- DuplicateSectionError is only raised by add_section()
(closes SF bug #830449 )
2004-05-18 03:56:51 +00:00
Fred Drake
abc086fb0d
ConfigParser:
...
- don't allow setting options to non-string values; raise TypeError
when the value is set, instead of raising an arbitrary exception
later (such as when string interpolation is performed)
- add tests, documentation
(closes SF bug #810843 )
2004-05-18 03:29:52 +00:00
Fred Drake
bc12b01d83
ConfigParser:
...
- ensure that option names in interpolations are handled by
self.optionxform in the same way that other references to option
names
- add tests, documentation
(closes SF bug #857881 , patch #865455 )
2004-05-18 02:25:51 +00:00
Skip Montanaro
beddfcb6d0
date typo in %changelog
2004-05-17 13:17:38 +00:00
Tim Peters
ad9a7c4489
test_alias_nofallback(): Someone broke this test, after 2.3, by
...
converting it into assertRaises() form. Restored the 2.3 code, and
explained why assertRaises() cannot be used instead.
2004-05-16 05:36:30 +00:00
Barry Warsaw
e4aeb7d1f1
_parsegen(): Add a missing check for NeedMoreData.
2004-05-15 16:26:28 +00:00
Raymond Hettinger
97b6484dc4
Update the DLL example to work with Py2.4.
2004-05-15 07:39:00 +00:00
Skip Montanaro
2dc0c13840
typo - fixes 954030.
2004-05-14 16:31:56 +00:00
Barry Warsaw
ac606ccb79
forward porting from release23-maint
2004-05-13 23:18:54 +00:00
Barry Warsaw
2178a6d1a2
test_boundary_in_non_multipart(): Added a test for SF bug # 846938.
2004-05-13 23:17:04 +00:00
Barry Warsaw
61e5616d74
encode_7or8bit(): Clearing out some old patches; iso-2202 is non-ASCII but
...
still 7-bit.
2004-05-13 22:50:12 +00:00
Barry Warsaw
4e59bc1e67
readline(): RFC 2046, section 5.1.2 (and partially 5.1) both state that the
...
parser must recognize outer boundaries in inner parts. So cruise through the
EOF stack backwards testing each predicate against the current line.
There's still some discussion about whether this is (always) the best thing to
do. Anthony would rather parse these messages as if the outer boundaries were
ignored. I think that's counter to the RFC, but might be practically more
useful. Can you say behavior flag? (ug).
2004-05-13 20:17:51 +00:00
Barry Warsaw
58eb0fcb8f
test_nested_inner_contains_outer_boundary(), test_nested_with_same_boundary():
...
Two evil samples from Anthony's MIME torture tests.
2004-05-13 20:15:20 +00:00
Barry Warsaw
d49f1d6c5a
_structure(): Make sure all output goes the to fp object.
2004-05-13 20:14:20 +00:00