A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-June/134999.html below:

[Python-Dev] Returning Windows file attribute information via os.stat()

[Python-Dev] Returning Windows file attribute information via os.stat() [Python-Dev] Returning Windows file attribute information via os.stat()Ben Hoyt benhoyt at gmail.com
Tue Jun 10 14:20:56 CEST 2014
>>      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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4