On 12/23/23 10:48, Antoon Pardon wrote:
Op 22/12/2023 om 21:39 schreef DL Neil via Python-list:
Why create a DirEntry? Why not go directly to os.mkdir() or whatever?

Because I have functions with DirEntry parameters.


Python is duck-typed, so it's quite likely that if you pass something that *looks like* a DirEntry - has the same variables and methods - it will work. If it walks like a DirEntry and quacks like a DirEntry, it's a DirEntry.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to