How do I do a doctest that requires sending an escaped quotation mark in the parameters?…
Rate quality
Private research annotation
Sign in to add a private research label or note.
- User
How do I do a doctest that requires sending an escaped quotation mark in the parameters? Like this: parameter: '"custom instructions" in ' Tired:
slugify("'"custom instructions" in '", args)
Assistant
To write a doctest that requires sending an escaped quotation mark in the parameters, you can use double quotes to enclose the string and single quotes inside the string, or vice versa. In your case, you can modify the doctest like this: python
slugify('"custom instructions" in ', args) Here, the outer double quotes enclose the string, and the inner double quotes are part of the string itself. This should resolve the syntax error you encountered. Share Export