On 06/15/2016 12:24 PM, Koos Zevenhoven wrote: > On Wed, Jun 15, 2016 at 10:15 PM, Brett Cannon wrote: >> ABCs like os.PathLike can override __subclasshook__ so that registration >> isn't required (see >> https://hg.python.org/cpython/file/default/Lib/os.py#l1136). So registration >> is definitely good to do to be explicit that you're trying to meet an ABC, >> but it isn't strictly required. > And the other question could be turned into whether to make str and > bytes also PathLike in __subclasshook__. No, for two reasons. - most str's and bytes' are not paths; - PathLike indicates a rich-path object, which str's and bytes' are not. -- ~Ethan~
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4