mirror of
https://github.com/python/cpython.git
synced 2024-12-02 14:24:12 +08:00
6912d4ddf0
NEEDS DOC CHANGES. This one surprised me! While I expected tuple() to be a no-brainer, turns out it's actually dripping with consequences: 1. It will *allow* the popular PySequence_Fast() to work with any iterable object (code for that not yet checked in, but should be trivial). 2. It caused two std tests to fail. This because some places used PyTuple_Sequence() (the C spelling of tuple()) as an indirect way to test whether something *is* a sequence. But tuple() code only looked for the existence of sq->item to determine that, and e.g. an instance passed that test whether or not it supported the other operations tuple() needed (e.g., __len__). So some things the tests *expected* to fail with an AttributeError now fail with a TypeError instead. This looks like an improvement to me; e.g., test_coercion used to produce 559 TypeErrors and 2 AttributeErrors, and now they're all TypeErrors. The error details are more informative too, because the places calling this were *looking* for TypeErrors in order to replace the generic tuple() "not a sequence" msg with their own more specific text, and AttributeErrors snuck by that. |
||
---|---|---|
.. | ||
RPM | ||
ACKS | ||
AIX-NOTES | ||
BeOS-NOTES | ||
BeOS-setup.py | ||
BLURB | ||
BLURB.LUTZ | ||
BLURB.WINDOWS | ||
cheatsheet | ||
comparisons | ||
editline-fix | ||
faq2html.py | ||
find_recursionlimit.py | ||
fixfuncptrs.sh | ||
gdbinit | ||
HISTORY | ||
HPUX-NOTES | ||
HYPE | ||
indent.pro | ||
Makefile.pre.in | ||
NEWS | ||
NEXT-NOTES | ||
Porting | ||
PURIFY.README | ||
python-mode.el | ||
python.man | ||
README | ||
renumber.py | ||
RFD | ||
setuid-prog.c | ||
unicode.txt | ||
vgrindefs |
Python Misc subdirectory ======================== This directory contains files that wouldn't fit in elsewhere, in particular the UNIX manual page, an Emacs mode for Python source code, and a list of Frequently Asked Questions (and their answers). Some documents are only of historic importance. Files found here ---------------- ACKS Acknowledgements AIX-NOTES Notes for building Python on AIX (all new!) BLURB A quick description of Python for newcomers BLURB.LUTZ A testimonial from a converted Tcl/Perl hacker :-) BLURB.WINDOWS First announcement of Python for Windows HISTORY News from previous releases -- oldest last HPUX-NOTES Notes about dynamic loading under HP-UX HYPE More hype about Python Makefile Used for administrative chores like cleaning up Makefile.pre.in Generic Makefile template for building extensions NEWS News for this release NEXT-NOTES Porting notes for NeXT PURIFY.README Information for Purify users Porting Mini-FAQ on porting to new platforms README The file you're reading now RFD Request For Discussion about a Python newsgroup cheatsheet Quick summary of Python by Ken Manheimer comparisons (Old) comparisons to some other languages editline-fix A news article on how to fix R$'s editline for Python faq2html FAQ to HTML converter by Ka-Ping Yee find_recursionlimit.py Script to find a value for sys.maxrecursionlimit fixfuncptrs.sh Shell script to fix function pointer initializers indent.pro GNU indent profile approximating my C style python-mode.el Emacs mode for editing Python programs python.man UNIX man page for the python interpreter renumber.py Script to renumber the sections in the FAQ setuid-prog.c C helper program for set-uid Python scripts unicode.txt Marc-Andre Lemburg's specification of the Unicode API vgrindefs Python configuration for vgrind (a generic pretty printer)