Skip to content

Commit 8beb15f

Browse files
authored
Add Quine in Cython (#5216)
1 parent f042a08 commit 8beb15f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

archive/c/cython/quine.pyx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from libc.stdio cimport printf
2+
3+
def main():
4+
cdef bytes s = b"""from libc.stdio cimport printf
5+
6+
def main():
7+
cdef bytes s = b%c%c%c%s%c%c%c
8+
printf(s, 34, 34, 34, s, 34, 34, 34)
9+
10+
if __name__ == "__main__":
11+
main()"""
12+
printf(s, 34, 34, 34, s, 34, 34, 34)
13+
14+
if __name__ == "__main__":
15+
main()

0 commit comments

Comments
 (0)