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
f0fe2a22
Commit
f0fe2a22
authored
Mar 28, 2019
by
gsamain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PEP-8 indent for type inference test
parent
1e402dfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
nogil_test/cypclass_test_type_inference.pyx
nogil_test/cypclass_test_type_inference.pyx
+16
-16
No files found.
nogil_test/cypclass_test_type_inference.pyx
View file @
f0fe2a22
cdef
cypclass
SomeMemory
:
int
a
int
a
void
__init__
(
self
,
int
a
=
0
):
self
.
a
=
a
void
__init__
(
self
,
int
a
=
0
):
self
.
a
=
a
SomeMemory
__add__
(
self
,
SomeMemory
other
):
return
SomeMemory
(
self
.
a
+
other
.
a
)
SomeMemory
__add__
(
self
,
SomeMemory
other
):
return
SomeMemory
(
self
.
a
+
other
.
a
)
SomeMemory
__iadd__
(
self
,
SomeMemory
other
):
self
.
a
+=
other
.
a
SomeMemory
__iadd__
(
self
,
SomeMemory
other
):
self
.
a
+=
other
.
a
SomeMemory
__mul__
(
self
,
SomeMemory
other
):
return
SomeMemory
(
self
.
a
*
other
.
a
)
SomeMemory
__mul__
(
self
,
SomeMemory
other
):
return
SomeMemory
(
self
.
a
*
other
.
a
)
cdef
cypclass
SomeSubMemory
(
SomeMemory
):
int
b
int
b
cpdef
bag
():
o1
=
SomeMemory
()
o2
=
SomeMemory
(
4
)
o3
=
SomeSubMemory
(
3
)
o1
=
SomeMemory
()
o2
=
SomeMemory
(
4
)
o3
=
SomeSubMemory
(
3
)
o3
+=
o2
o1
=
o2
*
o3
return
str
(
o1
.
a
)
+
'
\
n
'
+
str
(
o2
.
a
)
+
'
\
n
'
+
str
(
o3
.
a
)
o3
+=
o2
o1
=
o2
*
o3
return
str
(
o1
.
a
)
+
'
\
n
'
+
str
(
o2
.
a
)
+
'
\
n
'
+
str
(
o3
.
a
)
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