I'm reading through someone's code and I've not seen the %
sign used this way before. The line is below:
select "modified" from tabDocType where "name" = %(name)s order by modified desc
It's an sql statement that is supposed to be executed in python but I can't seem to figure out what %(name)
does. I know %
acts as mod function in math and also used for formatting string but I've never seen in done this way before. Can someone explain what's happening here?
I've looked into string formatting: How can I selectively escape percent (%) in Python strings?
But it doesn't seem like what's happening here has anything to do with string formatting.