[Python-ideas] IntFlags
Neil Girdhar
mistersheik at gmail.com
Thu Mar 5 11:31:05 CET 2015
Actually, it would be cool to support nesting too, e.g.,
class SubPermissions(IntFields):
read = 0
write = 1
exec_ = 2
class Permissions(IntFields):
owner_flags = range(3), SubPermissions
group_flags = range(3, 6), SubPermissions
user_flags = range(6, 9), SubPermissions
regular_file = range(9), 0o755
character_file = range(9), 0o664
directory = range(9), 0o600
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150305/c006ac45/attachment.html>
More information about the Python-ideas
mailing list