Implement __str__ and __repr__ for struct and list builders. __str__ uses prettyPrint while __repr__ shows the type name and the low-whitespace stringification. Also implement __repr__ for StructSchema, just because why not?
This commit is contained in:
@@ -14,6 +14,12 @@ cdef extern from "capnp/common.h" namespace " ::capnp":
|
||||
cdef extern from "kj/string.h" namespace " ::kj":
|
||||
cdef cppclass StringPtr:
|
||||
StringPtr(char *)
|
||||
cdef cppclass String:
|
||||
char* cStr()
|
||||
|
||||
cdef extern from "kj/string-tree.h" namespace " ::kj":
|
||||
cdef cppclass StringTree:
|
||||
String flatten()
|
||||
|
||||
cdef extern from "kj/common.h" namespace " ::kj":
|
||||
cdef cppclass Maybe[T]:
|
||||
|
||||
Reference in New Issue
Block a user