On 6/29/2014 5:28 AM, Nick Coghlan wrote:
There'd still be a slight window of discrepancy (since the filesystem
state may change between reading the directory entry and making the
lstat() call), but this could be effectively eliminated from the
perspective of the Python code by making the result of the lstat()
call authoritative for the whole DirEntry object.

+1 to this in particular, but this whole refresh of the semantics sounds better overall.

Finally, for the case where someone does want to keep the DirEntry around, a .refresh() API could rerun lstat() and update all the data.

And with that (initial data potentially always populated, or None, and an explicit refresh() API), the data could all be returned as properties, implying that they aren't fetching new data themselves, because they wouldn't be.