Skip to content

0.2.2

@larryhastings larryhastings tagged this 12 Sep 11:22
Previously Perky used shlex.quote to quote strings.
But that can be a little dopey when it comes to
strings with quote marks in them.  If it decides
to double-quote your string, and your string
has double-quotes in it, it unquotes the string
then quotes the double quote with single quotes
then resumes the double-quotes.  Like this:
    unquoted:  Try our "delicious" hot dogs
    quoted:   "Try our "'"'"delicious"'"'" hot dogs"
I didn't expect that... and neither did Perky's
tokenizer!  So now Perky has its own hand-written
simple string quoting function.
Assets 2