Commit f77f6db1 authored by Xavier Thompson's avatar Xavier Thompson

Add format.pyx demo

parent eaf3ef02
from stdlib.string cimport Str
from stdlib.format cimport format
from libc.stdio cimport puts
def main():
with nogil:
s = format("{} is {}{}", Str('forty two') , b'4', 2)
puts(Str.to_c_str(s))
main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment