[Python-Dev] Returning Windows file attribute information via os.stat()
Ben Hoyt
benhoyt at gmail.com
Tue Jun 10 14:20:56 CEST 2014
More information about the Python-Dev mailing list
Tue Jun 10 14:20:56 CEST 2014
- Previous message: [Python-Dev] Returning Windows file attribute information via os.stat()
- Next message: [Python-Dev] Returning Windows file attribute information via os.stat()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>> if hasattr(st, 'st_winattrs') and st.st_winattrs &
>> FILE_ATTRIBUTE_HIDDEN:
>
> That could be written more succinctly as:
>
> if getattr(st, 'st_winattrs', 0) & FILE_ATTRIBUTE_HIDDEN:
>
>> return True
>> return False
Yes, good call. Or one further:
return getattr(st, 'st_winattrs', 0) & FILE_ATTRIBUTE_HIDDEN != 0
-Ben
- Previous message: [Python-Dev] Returning Windows file attribute information via os.stat()
- Next message: [Python-Dev] Returning Windows file attribute information via os.stat()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list