[issue31163] Return destination path in Path.rename and Path.replace

2017-08-09 Thread Alberto Gomez-Casado
New submission from Alberto Gomez-Casado: Extracted from issue31154 Both calls lack any kind of return, which leads me to expect after a rename/replace the Path instance would be changed to the new path. This is not the case (reading the PEP I have seen Path instances are kind of immutable

[issue31154] Path.replace and Path.rename naming, behavior and documentation

2017-08-09 Thread Alberto Gomez-Casado
New submission from Alberto Gomez-Casado: I find the naming of Path.replace quite unfortunate, coming from the os.path and basestring mindset, the expectation would be that it would change some substring by another substring in the Path instance. Instead, it _moves_ the file indicated