New submission from Joshua Avalon <joshuaava...@gmail.com>:

from shutil import move
from pathlib import Path

a = Path("s")
b = Path("a.txt")

move(b, a)


This will throw AttributeError: 'WindowsPath' object has no attribute 'rstrip'

>From the document, it should able to move:

If the destination is an existing directory, then src is moved inside that 
directory. If the destination already exists but is not a directory, it may be 
overwritten depending on os.rename() semantics.

If a = Path("s/a.txt"), it does not throw error.

Enviroment:
  Window 10
  Python 3.7.0

----------
components: Windows
messages: 321270
nosy: joshuaavalon, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Fail to move file in Windows (AttributeError)
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34069>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to