[Python-ideas] Dunder method to make object str-like
Ethan Furman
ethan at stoneleaf.us
Thu Apr 7 13:30:43 EDT 2016
On 04/07/2016 09:31 AM, Random832 wrote:
> Taking a step back, can someone explain to me in plain english why io
> and os shouldn't directly support pathlib? All this "well maybe make it
> a subclass, well maybe make a special protocol stuff can implement"
> stuff is dancing around that.
The protocol is "the how" of supporting pathlib, and, interestingly
enough, the easiest way to do so (avoids circular imports, etc., etc,.).
--
~Ethan~
More information about the Python-ideas
mailing list