我想在Python中使用DOT字符(.)
上的urllib.quote
,但是沒有得到我想要的輸出。urllib.quote在Python中的DOT字符(。)
>>> urllib.quote(".")
'.'
>>> urllib.quote_plus(".")
'.'
但是當我%2E
使用urllib.unquote
解除引用我得到
>>> urllib.unquote("%2E")
'.'
所以,我的問題是,爲什麼我不能夠得到%2E
我的輸出,當我在.
感謝您的回答。你能指出我正確的文件嗎? – RanRag
@Noob:「字母,數字和字符'_.-''從不引用」 - http://docs.python.org/library/urllib.html#urllib.quote –
@larsmans:謝謝 – RanRag