Convert arbitrary function inputs to string

Ian ian.g.kelly at gmail.com
Thu Jan 6 11:41:36 EST 2011


On Jan 6, 9:23 am, David <dwdreisigme... at gmail.com> wrote:
> Hi,
>
> I'd like to have a function that takes arbitrary inputs and returns
> them as a single string, with proper escapes for special characters I
> can define.  For example:

What sorts of arbitrary inputs?  Strings?  Sequences of strings?
Something else?  It's not clear from your examples, which use invalid
syntax.

If you're looking for something like the "quote" form from Lisp, you
can't really do that in Python.  Just use a string.

Cheers,
Ian



More information about the Python-list mailing list