what is %r mean?

"%r tag requires exactly two arguments" % token.contents.split()[0]

Well first of all, what exactly are you trying to do. I searched all over the place for that operator and found nothing.

# %r uses repr() and %s uses str()
# for example ...
print "%r tag requires exactly two arguments" % "this"
print "%s tag requires exactly two arguments" % "this"
"""
my output -->
'this' tag requires exactly two arguments
this tag requires exactly two arguments
"""
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.