mirror of
https://github.com/python/cpython.git
synced 2024-12-18 22:34:08 +08:00
517c7d4fd3
left and right type were of the same type and not classic instances. This shortcut is dangerous for proxy types, because it means that coerce(Proxy(1), Proxy(2.1)) leaves Proxy(1) unchanged rather than turning it into Proxy(1.0). In an ever-so-slight change of semantics, I now only take the shortcut when the left and right types are of the same type and don't have the CHECKTYPES feature. It so happens that classic instances have this flag, so the shortcut is still skipped in this case (i.e. nothing changes for classic instances). Proxies also have this flag set (otherwise implementing numeric operations on proxies would become nightmarish) and this means that the shortcut is also skipped there, as desired. It so happens that int, long and float also have this flag set; that means that e.g. coerce(1, 1) will now invoke int_coerce(). This is fine: int_coerce() can deal with this, and I'm not worried about the performance; int_coerce() is only invoked when the user explicitly calls coerce(), which should be rarer than rare. |
||
---|---|---|
.. | ||
RPM | ||
ACKS | ||
AIX-NOTES | ||
BeOS-NOTES | ||
BeOS-setup.py | ||
cheatsheet | ||
find_recursionlimit.py | ||
gdbinit | ||
HISTORY | ||
HPUX-NOTES | ||
indent.pro | ||
NEWS | ||
Porting | ||
PURIFY.README | ||
python-mode.el | ||
python.man | ||
README | ||
RFD | ||
setuid-prog.c | ||
vgrindefs |
Python Misc subdirectory ======================== This directory contains files that wouldn't fit in elsewhere. Some documents are only of historic importance. Files found here ---------------- ACKS Acknowledgements AIX-NOTES Notes for building Python on AIX BeOS-NOTES Notes for building on BeOS BeOS-setup.py setup.py replacement for BeOS, see BeOS-NOTES cheatsheet Quick summary of Python by Ken Manheimer find_recursionlimit.py Script to find a value for sys.maxrecursionlimit gdbinit Handy stuff to put in your .gdbinit file, if you use gdb HISTORY News from previous releases -- oldest last HPUX-NOTES Notes about dynamic loading under HP-UX indent.pro GNU indent profile approximating my C style NEWS News for this release (for some meaning of "this") Porting Mini-FAQ on porting to new platforms PURIFY.README Information for Purify users python.man UNIX man page for the python interpreter python-mode.el Emacs mode for editing Python programs README The file you're reading now RFD Request For Discussion about a Python newsgroup RPM (Old) tools to build RPMs setuid-prog.c C helper program for set-uid Python scripts vgrindefs Python configuration for vgrind (a generic pretty printer)