[New-bugs-announce] [issue31755] SetType is missing in the 'types' module
Kenji Asuka (Asuka Kenji)
report at bugs.python.org
Wed Oct 11 03:45:29 EDT 2017
New submission from Kenji Asuka (Asuka Kenji) <asukakenji at gmail.com>:
# Create a dict and a set
d = {1: '1'}
s = {1}
# They have different types
print(type(d)) # <type 'dict'>
print(type(s)) # <type 'set'>
print(type(d) is type(s)) # False
print(type(s) is type(d)) # False
print(type(d) == type(s)) # False
# Dictionary type is found in 'types' module
print(type(d) is types.DictType) # True
print(type(d) is types.DictionaryType) # True
print(types.DictType == types.DictionaryType) # True
# Set type is not found in 'types' module
print(type(s) is types.DictType) # False
print(type(s) is types.DictionaryType) # False
print(type(s) is types.DictProxyType) # False
print(type(s) is types.ListType) # False
print(type(s) is types.SliceType) # False
print(type(s) is types.TupleType) # False
print(type(s) is types.NotImplementedType) # False
print(type(s) is types.SetType) # AttributeError: 'module' object has no attribute 'SetType'
----------
components: Library (Lib)
messages: 304112
nosy: Kenji Asuka (Asuka Kenji)
priority: normal
severity: normal
status: open
title: SetType is missing in the 'types' module
type: compile error
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue31755>
_______________________________________
More information about the New-bugs-announce
mailing list