Tuple Format?

Clarence Gardner clarence at netlojix.com
Sun Sep 3 18:45:53 EDT 2000


On Sat, 02 Sep 2000, Ben Wolfson wrote:
>On Sun, 03 Sep 2000 02:49:58 GMT, nobody at nowhere.nohow (Grant Edwards)
>wrote:
>
>>I don't think the single back-quote "`" is used for anything in Python, is
>>it?
>
>Backquotes around an object (`x`) appear to be a shorthand for calling
>repr() on that object.  It seems rather odd, to me, that there should be
>two ways to do such a simple thing.
>
Allow me to remove the oddity, then.  What is inside of the backquotes
is not an object, but an expression.  The backquotes evaluate the expression
and return the result, stringified.




More information about the Python-list mailing list