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
Gwenaël Samain
cython
Commits
0c2e63ad
Commit
0c2e63ad
authored
Jun 26, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test case for class decorators
parent
18469076
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
tests/run/classdecorators_T336.pyx
tests/run/classdecorators_T336.pyx
+44
-0
No files found.
tests/run/classdecorators_T336.pyx
0 → 100644
View file @
0c2e63ad
__doc__
=
u"""
>>> print('
\
\
n'.join(calls))
Py-Honk PyTestClass
PyTestClass
Py-Hello PyTestClass
PyTestClass
Py-Done PyTestClass
>>> c = PyTestClass()
Ho, Ho, Ho!
"""
calls
=
[]
class
print_msg
(
object
):
def
__init__
(
self
,
message
):
self
.
msg
=
message
def
__call__
(
self
,
c
):
calls
.
append
(
self
.
msg
+
c
.
__name__
)
return
c
def
print_name
(
c
):
calls
.
append
(
c
.
__name__
)
return
c
@
print_msg
(
u"Py-Done "
)
@
print_name
@
print_msg
(
u"Py-Hello "
)
@
print_name
@
print_msg
(
u"Py-Honk "
)
class
PyTestClass
(
object
):
def
__init__
(
self
):
print
u"Ho, Ho, Ho!"
# not currently working:
#
## @print_msg("Cy-Done ")
## @print_name
## @print_msg("Cy-Hello ")
## @print_name
## @print_msg("Cy-Honk ")
## cdef class CyTestClass(object):
## def __init__(self):
## print u"Ho, Ho, Ho!"
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