Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
20d9cddc
Commit
20d9cddc
authored
Apr 15, 2010
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support 'frozenset' in cython namespace (just like 'set')
parent
fdf00273
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Cython/Compiler/ParseTreeTransforms.py
Cython/Compiler/ParseTreeTransforms.py
+2
-2
Cython/Shadow.py
Cython/Shadow.py
+3
-3
No files found.
Cython/Compiler/ParseTreeTransforms.py
View file @
20d9cddc
...
...
@@ -1261,8 +1261,8 @@ class TransformBuiltinMethods(EnvTransform):
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
...
...
Cython/Shadow.py
View file @
20d9cddc
...
...
@@ -162,14 +162,14 @@ except NameError: # Py3
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment