Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(596)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Unified Diff: Objects/abstract.c

Issue 504: Patch to short circuit an exact match (Closed) Base URL: http://svn.python.org/view/*checkout*/python/trunk/
Patch Set: Created 17 years, 8 months ago , Downloaded from: http://bugs.python.org/file9742/isinst.diff
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
('e') | ('c') | ('s')
Index: Objects/abstract.c
===================================================================
--- Objects/abstract.c (revision 61567)
+++ Objects/abstract.c (working copy)
@@ -2909,8 +2909,12 @@
static PyObject *name = NULL;
PyObject *t, *v, *tb;
PyObject *checker;
+
+ /* Quick test for an exact match */
+ if (Py_TYPE(inst) == cls && !PyTuple_Check(cls))
GvR 2008年05月02日 05:20:44 The tuple check is technically redundant. :-)
The tuple check is technically redundant. :-)
+ return 1;
+
PyErr_Fetch(&t, &v, &tb);
-
if (name == NULL) {
name = PyString_InternFromString("__instancecheck__");
if (name == NULL)
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /