|
@ -1273,7 +1273,7 @@ else: |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
#### Usage: |
|
|
#### Usage: |
|
|
``` |
|
|
|
|
|
|
|
|
```text |
|
|
$ python3 prog.py --help |
|
|
$ python3 prog.py --help |
|
|
usage: test2.py [-h] [-v | -q] x y |
|
|
usage: test2.py [-h] [-v | -q] x y |
|
|
|
|
|
|
|
@ -1393,7 +1393,7 @@ from urllib.parse import quote, quote_plus, unquote, unquote_plus |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
### Encode |
|
|
### Encode |
|
|
```text |
|
|
|
|
|
|
|
|
```python |
|
|
>>> quote("Can't be in URL!") |
|
|
>>> quote("Can't be in URL!") |
|
|
'Can%27t%20be%20in%20URL%21' |
|
|
'Can%27t%20be%20in%20URL%21' |
|
|
>>> quote_plus("Can't be in URL!") |
|
|
>>> quote_plus("Can't be in URL!") |
|
@ -1401,7 +1401,7 @@ from urllib.parse import quote, quote_plus, unquote, unquote_plus |
|
|
``` |
|
|
``` |
|
|
|
|
|
|
|
|
### Decode |
|
|
### Decode |
|
|
```text |
|
|
|
|
|
|
|
|
```python |
|
|
>>> unquote('Can%27t+be+in+URL%21') |
|
|
>>> unquote('Can%27t+be+in+URL%21') |
|
|
"Can't+be+in+URL!" |
|
|
"Can't+be+in+URL!" |
|
|
>>> unquote_plus('Can%27t+be+in+URL%21') |
|
|
>>> unquote_plus('Can%27t+be+in+URL%21') |
|
|