[Python-ideas] PEP 428 - object-oriented filesystem paths
ericsnowcurrently at gmail.com
Sat Oct 6 19:29:37 CEST 2012
On Sat, Oct 6, 2012 at 6:09 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> On Fri, 5 Oct 2012 23:16:55 -0600
> Eric Snow <ericsnowcurrently at gmail.com>
>> Each namedtuple has a _replace() method that's is used to generate a
>> new instance with one or more attributes changed. We could do
>> something similar here:
> The concrete Path objects' replace() method already maps to
> Note os.replace() is new in 3.3 and is a portable always-overwriting
> alternative to os.rename():
Sure. The point is that the API include some method that works this
way, regardless of what the name ultimately is. :) Stephen J.
Turnbull called it subst() and expanded on the idea.
More information about the Python-ideas