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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
3149eb83
Commit
3149eb83
authored
Mar 09, 2020
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make it a bit less likely that the Python version of cython.cast() does something unexpected/wrong.
parent
bf6cd7a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
Cython/Shadow.py
Cython/Shadow.py
+1
-1
No files found.
Cython/Shadow.py
View file @
3149eb83
...
@@ -163,7 +163,7 @@ def cmod(a, b):
...
@@ -163,7 +163,7 @@ def cmod(a, b):
def
cast
(
type
,
*
args
,
**
kwargs
):
def
cast
(
type
,
*
args
,
**
kwargs
):
kwargs
.
pop
(
'typecheck'
,
None
)
kwargs
.
pop
(
'typecheck'
,
None
)
assert
not
kwargs
assert
not
kwargs
if
hasattr
(
type
,
'__call__'
):
if
callable
(
type
)
and
not
(
args
and
isinstance
(
args
[
0
],
type
)
):
return
type
(
*
args
)
return
type
(
*
args
)
else
:
else
:
return
args
[
0
]
return
args
[
0
]
...
...
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