making your own DirEntry.

immibis news at immibis.com
Sat Dec 23 05:30:24 EST 2023


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.


More information about the Python-list mailing list