KxSystems / embedPy

Allows the kdb+ interpreter to call Python functions
https://code.kx.com/q/interfaces
Apache License 2.0
87 stars 42 forks source link

Unable to parse multiline triple-quoted strings #67

Closed WillDaSilva closed 4 years ago

WillDaSilva commented 5 years ago

Input file test.p:

s = '''
    multiline triple-quoted string
'''

Output from running q test.p:

'e: EOF while scanning triple-quoted string literal (, line 2)                                                     
  [2]  /IVY/instances/1268/delta-bin/software/KDBPlus_3_6_0/p.q:13: .p.e:{$["def"~3#x;$[x[3]in"<*>";ei 3;eo];"class"
~5#x;$[x[5]in"*>";ei 5;eo];eo]x}
                                                                          ^                                        
elopezaguilera commented 5 years ago

Hi,

If you want to define the string using that syntax you need to include a blank space before the triple quote that closes the string. It should be like this:

s = '''
    multiline triple-quoted string
 '''
cmccarthy1 commented 4 years ago

Hi @WillDaSilva

Thanks for opening this issue, I believe that the response above is sufficient as an answer to your question so I'm going to close the issue for now.

Please feel free to reopen the issue if deemed necessary. Any further questions about this please leave them here.