node = BoolNode(node.pos, value=True)
elif attribute == u'NULL':
node = NullNode(node.pos)
- elif attribute == u'set':
- node = NameNode(node.pos, name=EncodedString('set'))
+ elif attribute in (u'set', u'frozenset'):
+ node = NameNode(node.pos, name=EncodedString(attribute))
elif not PyrexTypes.parse_basic_type(attribute):
error(node.pos, u"'%s' not a valid cython attribute or is being used incorrectly" % attribute)
return node
try:
# Python 3
- from builtins import set
+ from builtins import set, frozenset
except ImportError:
try:
# Python 2.4+
- from __builtin__ import set
+ from __builtin__ import set, frozenset
except ImportError:
# Py 2.3
- from sets import Set as set
+ from sets import Set as set, ImmutableSet as frozenset
# Predefined types