This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2016年04月13日 15:29 by Nan Wu, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| doc_InstanceType_is_for_old_style_cls.patch | Nan Wu, 2016年04月13日 15:29 | |||
| Messages (3) | |||
|---|---|---|---|
| msg263338 - (view) | Author: Nan Wu (Nan Wu) * | Date: 2016年04月13日 15:29 | |
>>> import types >>> a = 1 >>> isinstance(a, types.InstanceType) False >>> class A: ... pass ... >>> a = A() >>> isinstance(a, types.InstanceType) True >>> class A(object): ... pass ... >>> a = A() >>> isinstance(a, types.InstanceType) False Looks like isinstance(instance, types.InstanceType) only return True for user-defined old-style class instance. If it's the case, I feel doc should clarify that like what types.ClassType did. If no, someone please close this request. Thanks. |
|||
| msg263403 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年04月14日 12:50 | |
New changeset b684298671f9 by Berker Peksag in branch '2.7': Issue #26747: Document that InstanceTypes only works for old-style classes https://hg.python.org/cpython/rev/b684298671f9 |
|||
| msg263404 - (view) | Author: Berker Peksag (berker.peksag) * (Python committer) | Date: 2016年04月14日 12:51 | |
Thanks! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:29 | admin | set | github: 70934 |
| 2016年04月14日 12:51:40 | berker.peksag | set | status: open -> closed nosy: + berker.peksag messages: + msg263404 resolution: fixed stage: patch review -> resolved |
| 2016年04月14日 12:50:42 | python-dev | set | nosy:
+ python-dev messages: + msg263403 |
| 2016年04月13日 16:07:41 | SilentGhost | set | assignee: docs@python nosy: + docs@python components: + Documentation stage: patch review |
| 2016年04月13日 15:29:00 | Nan Wu | create | |