Message331003
The urllib.parse module contains an undocumented function unwrap:
unwrap('<URL:type://host/path>') --> 'type://host/path'
This is useful. I've been re-inventing this function in many of my scripts, because I didn't know it existed (not documented!) and only stumbled across it by accident today, where I see it was deprecated in #27485 but I can't see any reason for the deprecation.
If not for the deprecation, I would certainly use this unwrap function in preference to rolling my own.
It seems to me that this might have been a case of an over-enthusiastic change. #27485 talks about deprecating the various split* functions, which are officially redundant (urlparse and urlsplit are preferred) but doesn't talk about unwrap, which is useful and (in my opinion) should have been documented rather than deprecated. |
|
| Date |
User |
Action |
Args |
| 2018-12-03 23:25:50 | steven.daprano | set | recipients:
+ steven.daprano, serhiy.storchaka, cheryl.sabella |
| 2018-12-03 23:25:50 | steven.daprano | set | messageid: <[email protected]> |
| 2018-12-03 23:25:50 | steven.daprano | link | issue35397 messages |
| 2018-12-03 23:25:50 | steven.daprano | create | |
|