[issue26747] types.InstanceType only for old style class only in 2.7

2016-04-14 Thread Berker Peksag

Berker Peksag added the comment:

Thanks!

--
nosy: +berker.peksag
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26747] types.InstanceType only for old style class only in 2.7

2016-04-14 Thread Roundup Robot

Roundup Robot added the comment:

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

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26747] types.InstanceType only for old style class only in 2.7

2016-04-13 Thread SilentGhost

Changes by SilentGhost :


--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26747] types.InstanceType only for old style class only in 2.7

2016-04-13 Thread Nan Wu

New submission from Nan Wu:

>>> 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.

--
files: doc_InstanceType_is_for_old_style_cls.patch
keywords: patch
messages: 263338
nosy: Nan Wu
priority: normal
severity: normal
status: open
title: types.InstanceType only for old style class only in 2.7
type: enhancement
versions: Python 2.7
Added file: 
http://bugs.python.org/file42456/doc_InstanceType_is_for_old_style_cls.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com