Closed Fancyapplebee closed 1 year ago
In version 2.4.1 of cppyy, newlines require two backslashes instead of one. For example. This won't work:
cppyy.cppdef( ''' struct something { void baseLineStats() { std::cout << "as\n" ; } }; ''')
But this will work:
Hasn't this always been the case? I.e., it's not new in 2.4.1? I also think it's the expected behavior. Anyway, Python has raw strings for this purpose: just prepend an r.
r
In version 2.4.1 of cppyy, newlines require two backslashes instead of one. For example. This won't work:
cppyy.cppdef( ''' struct something { void baseLineStats() { std::cout << "as\n" ; } }; ''')
But this will work:
cppyy.cppdef( ''' struct something { void baseLineStats() { std::cout << "as\n" ; } }; ''')