cannout urllib.urlencode a URL in python
Why am I getting this error when trying to urlencode this string

     >>> callback = "http://localhost/application/authtwitter?twitterCallback"
     >>> urllib.urlencode(callback)
     Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
          File "/usr/lib/python2.7/urllib.py", line 1261, in urlencode
          raise TypeError
     TypeError: not a valid non-string sequence or mapping object
cannout urllib.urlencode a URL in python
===

Why am I getting this error when trying to urlencode this string

     >>> callback = "http://localhost/application/authtwitter?twitterCallback"
     >>> urllib.urlencode(callback)
     Traceback (most recent call last):
          File "<stdin>", line 1, in <module>
          File "/usr/lib/python2.7/urllib.py", line 1261, in urlencode
          raise TypeError
     TypeError: not a valid non-string sequence or mapping object