Bruno P. Kinoshita <brunodepau...@yahoo.com.br> added the comment:

Hi Giampaolo,

I think it is more or less the same as the previous code, which was using 
os.list to return a list in memory. My first tentative fix was:

    def copytree(src, ...):
        entries = os.list(src)
        return _copytree(entries=entries, ...)

But the previous PR also altered _copytree to use the return of os.scandir 
DirEntry's, so the change above results in AttributeError: 'str' object has no 
attribute 'name'.

Would be better to avoid using iterator to populate a list, and also using the 
DirEntry in _copytree, and just stick with the previous code with (i.e. 
os.listdir() and a single copytree method as before)? Or if you think we should 
go with your suggestion, I'm good with it as well - especially as it'd be a 
much simpler PR :)

Thanks
Bruno

----------

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

Reply via email to