cpython/Lib
Tim Peters 1fc240e851 Generalize dictionary() to accept a sequence of 2-sequences. At the
outer level, the iterator protocol is used for memory-efficiency (the
outer sequence may be very large if fully materialized); at the inner
level, PySequence_Fast() is used for time-efficiency (these should
always be sequences of length 2).

dictobject.c, new functions PyDict_{Merge,Update}FromSeq2.  These are
wholly analogous to PyDict_{Merge,Update}, but process a sequence-of-2-
sequences argument instead of a mapping object.  For now, I left these
functions file static, so no corresponding doc changes.  It's tempting
to change dict.update() to allow a sequence-of-2-seqs argument too.

Also changed the name of dictionary's keyword argument from "mapping"
to "x".  Got a better name?  "mapping_or_sequence_of_pairs" isn't
attractive, although more so than "mosop" <wink>.

abstract.h, abstract.tex:  Added new PySequence_Fast_GET_SIZE function,
much faster than going thru the all-purpose PySequence_Size.

libfuncs.tex:
- Document dictionary().
- Fiddle tuple() and list() to admit that their argument is optional.
- The long-winded repetitions of "a sequence, a container that supports
  iteration, or an iterator object" is getting to be a PITA.  Many
  months ago I suggested factoring this out into "iterable object",
  where the definition of that could include being explicit about
  generators too (as is, I'm not sure a reader outside of PythonLabs
  could guess that "an iterator object" includes a generator call).
- Please check my curly braces -- I'm going blind <0.9 wink>.

abstract.c, PySequence_Tuple():  When PyObject_GetIter() fails, leave
its error msg alone now (the msg it produces has improved since
PySequence_Tuple was generalized to accept iterable objects, and
PySequence_Tuple was also stomping on the msg in cases it shouldn't
have even before PyObject_GetIter grew a better msg).
2001-10-26 05:06:50 +00:00
..
compiler Whitespace normalization. 2001-10-18 21:57:37 +00:00
curses
distutils With Andrew's blessing: distutils version number is now 1.0.3. 2001-10-05 20:43:09 +00:00
email A fix for SF bug #472560, extra newlines returned by get_param() when 2001-10-25 22:43:46 +00:00
encodings
hotshot pstats-compatible analysis module. 2001-10-15 22:18:53 +00:00
idlelib font/tabs config dialog page now reads its data from the config file 2001-10-23 10:42:12 +00:00
lib-old
lib-tk Move grid_location into Misc. Fixes bug #426892. 2001-10-13 09:33:51 +00:00
plat-aix3
plat-aix4
plat-beos5
plat-freebsd2
plat-freebsd3
plat-freebsd4
plat-freebsd5
plat-generic
plat-irix5
plat-irix6
plat-linux1
plat-linux2
plat-netbsd1
plat-next3
plat-riscos SF patch #474590 -- RISC OS support 2001-10-24 20:42:55 +00:00
plat-sunos4
plat-sunos5
plat-unixware7
site-packages
test Generalize dictionary() to accept a sequence of 2-sequences. At the 2001-10-26 05:06:50 +00:00
xml Remove obsolete __dynamic__ distinction. 2001-10-15 22:53:29 +00:00
__future__.py
__phello__.foo.py Fix the frozen bytecode for __hello__ (betcha didn't know that existed 2001-10-18 18:49:37 +00:00
aifc.py
anydbm.py
asynchat.py
asyncore.py Reindent __repr__. 2001-10-18 17:33:19 +00:00
atexit.py
audiodev.py
base64.py
BaseHTTPServer.py
Bastion.py
bdb.py
binhex.py
bisect.py
calendar.py
cgi.py "ib" should be "boundary"; reported by Neal Norwitz. 2001-10-13 18:38:53 +00:00
CGIHTTPServer.py Fix two typos, one noted by Noah Spurrier in SF bug #475166, the 2001-10-26 03:38:46 +00:00
cgitb.py
chunk.py
cmd.py
code.py
codecs.py
codeop.py
colorsys.py
commands.py
compileall.py
ConfigParser.py Whitespace normalization. 2001-10-18 21:57:37 +00:00
Cookie.py
copy.py
copy_reg.py
dbhash.py
difflib.py Whitespace normalization. 2001-10-04 05:36:56 +00:00
dircache.py
dis.py
doctest.py SF bug [#473864] doctest expects spurios space. 2001-10-23 02:21:52 +00:00
dospath.py SF bug [#469732] os.path.walk docstring inconsistent. 2001-10-10 04:16:20 +00:00
dumbdbm.py SF patch #474590 -- RISC OS support 2001-10-24 20:42:55 +00:00
FCNTL.py
filecmp.py
fileinput.py SF patch #474590 -- RISC OS support 2001-10-24 20:42:55 +00:00
fnmatch.py
formatter.py
fpformat.py
ftplib.py Oops. Catching OverflowError from int() doesn't help, since it raises 2001-10-17 17:21:47 +00:00
getopt.py
getpass.py
gettext.py
glob.py
gopherlib.py
gzip.py "f" should be "self"; reported by Neal Norwitz. 2001-10-13 18:33:51 +00:00
hmac.py
htmlentitydefs.py
htmllib.py
HTMLParser.py
httplib.py Somebody checked in a version of httplib that doesn't even compile -- 2001-10-11 18:15:51 +00:00
ihooks.py
imaplib.py Make tabnanny happy. (Piers, please run the test suite before 2001-10-22 00:42:26 +00:00
imghdr.py
imputil.py
inspect.py Get rid of __defined__ and tp_defined -- there's no need to 2001-10-15 22:03:32 +00:00
keyword.py
knee.py
linecache.py
locale.py
macpath.py SF bug [#469732] os.path.walk docstring inconsistent. 2001-10-10 04:16:20 +00:00
macurl2path.py
mailbox.py
mailcap.py
markupbase.py Remove extra param from call to self.error(). 2001-10-13 15:59:47 +00:00
mhlib.py Folder.getlast(): avoid PyChecker warning. 2001-10-17 05:59:26 +00:00
mimetools.py
mimetypes.py Applying proposed patch for bug #474583, optional support for 2001-10-25 21:49:18 +00:00
MimeWriter.py
mimify.py
multifile.py Martijn Pieters convinced me that when readline() strips the trailing 2001-10-05 21:22:21 +00:00
mutex.py
netrc.py
nntplib.py changed misleading argument name 2001-10-18 20:58:25 +00:00
ntpath.py SF bug [#469732] os.path.walk docstring inconsistent. 2001-10-10 04:16:20 +00:00
nturl2path.py
os.py SF patch #474590 -- RISC OS support 2001-10-24 20:42:55 +00:00
pdb.doc
pdb.py
pickle.py Use cStringIO when available. 2001-10-15 21:29:28 +00:00
pipes.py
popen2.py
poplib.py Only close sockets if they have been created. Reported by Blake Winton. 2001-10-07 08:53:32 +00:00
posixfile.py Add a warning to the posixfile module stating that it will go away. 2001-10-24 22:03:35 +00:00
posixpath.py SF bug [#469732] os.path.walk docstring inconsistent. 2001-10-10 04:16:20 +00:00
pprint.py Remove obsolete email address. 2001-10-09 20:53:48 +00:00
pre.py
profile.doc
profile.py Minor code cleanups based on comments from Neal Norwitz. 2001-10-17 01:49:50 +00:00
pstats.py Put the deprecated .ignore() method back where it was. 2001-10-08 06:28:18 +00:00
pty.py
py_compile.py
pyclbr.py SF bug #473525 pyclbr broken 2001-10-24 20:22:40 +00:00
pydoc.py SF bug [#472347] pydoc and properties. 2001-10-18 19:56:17 +00:00
Queue.py
quopri.py Patch 471400: escape single-dot lines; by Jason Hildebrand. 2001-10-15 18:44:26 +00:00
random.py
re.py
reconvert.py
regex_syntax.py
regsub.py
repr.py
rexec.py Ignore execfile() return value; reported by Neal Norwitz. 2001-10-13 18:34:42 +00:00
rfc822.py
rlcompleter.py
robotparser.py
sched.py
sgmllib.py
shelve.py
shlex.py
shutil.py
SimpleHTTPServer.py
SimpleXMLRPCServer.py
site.py SF patch #474590 -- RISC OS support 2001-10-24 20:42:55 +00:00
smtpd.py SMTPServer.__init__(): The asyncore.dispatcher base class has a method 2001-10-09 15:46:31 +00:00
smtplib.py SMTPError should be SMTPException; reported by Neal Norwitz. 2001-10-13 18:35:32 +00:00
sndhdr.py
socket.py SF patch #474590 -- RISC OS support 2001-10-24 20:42:55 +00:00
SocketServer.py Apply the first chunk of the second patch from SF bug #471720: 2001-10-23 21:42:45 +00:00
sre.py (experimental) "finditer" method/function. this works pretty much 2001-10-24 22:16:30 +00:00
sre_compile.py
sre_constants.py
sre_parse.py
stat.py
statcache.py
statvfs.py
string.py
StringIO.py
stringold.py
sunau.py
sunaudio.py
symbol.py track addition of testlist_safe to Grammar 2001-10-17 13:13:04 +00:00
symtable.py
tabnanny.py
telnetlib.py Only close sockets if they have been created. Reported by Blake Winton. 2001-10-07 08:53:32 +00:00
tempfile.py SF patch #474590 -- RISC OS support 2001-10-24 20:42:55 +00:00
TERMIOS.py
threading.py
toaiff.py
token.py
tokenize.py
traceback.py
tty.py
types.py
tzparse.py
unittest.py A few formatting nits: 2001-10-22 18:14:15 +00:00
urllib.py Added missing parameter in call to http_error_default(); 2001-10-13 18:37:07 +00:00
urllib2.py Fix [ #465502 ] urllib2: urlopen unicode problem 2001-10-09 16:18:45 +00:00
urlparse.py
user.py
UserDict.py
UserList.py
UserString.py
uu.py
warnings.py
wave.py
weakref.py ReferenceError is now built-in, so pick it up from the right place. 2001-10-05 21:54:09 +00:00
webbrowser.py _os should be os; reported by Neal Norwitz. 2001-10-13 16:00:52 +00:00
whichdb.py SF patch #474590 -- RISC OS support 2001-10-24 20:42:55 +00:00
whrandom.py
xdrlib.py
xmllib.py
xmlrpclib.py test for int and long int overflow (allows operation on 64-bit platforms) 2001-10-17 22:53:33 +00:00
zipfile.py