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
b34b20d4
Commit
b34b20d4
authored
Mar 08, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test case for ticket #18
parent
528fe9df
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
55 additions
and
0 deletions
+55
-0
tests/bugs/class_attribute_init_values_T18.pyx
tests/bugs/class_attribute_init_values_T18.pyx
+55
-0
No files found.
tests/bugs/class_attribute_init_values_T18.pyx
0 → 100644
View file @
b34b20d4
__doc__
=
u"""
>>> f = PyFoo()
>>> print(f.bar)
5
>>> print(f.baz)
someval
>>> f = MyPyFoo()
>>> print(f.bar)
7
>>> print(f.baz)
anotherval
>>> f = CyFoo()
>>> print(f.bar)
5
>>> print(f.baz)
anotherval
>>> f = MyCyFoo()
>>> print(f.bar)
7
>>> print(f.baz)
anotherval
>>> f = AnotherFoo()
>>> print(f.bar)
8
>>> print(f.baz)
yetanotherval
"""
# this works:
class
PyFoo
(
object
):
bar
=
5
baz
=
u"someval"
class
MyPyFoo
(
PyFoo
):
bar
=
7
baz
=
u"anotherval"
# this doesn't:
cdef
class
CyFoo
:
cdef
public
int
bar
=
5
cdef
public
object
baz
=
u"someval"
cdef
class
MyCyFoo
(
CyFoo
):
cdef
public
int
bar
=
7
cdef
public
object
baz
=
u"anotherval"
class
AnotherFoo
(
CyFoo
):
bar
=
8
baz
=
u"yetanotherval"
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