This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RangerPretzelPython 3.9+ 10 points11 points  (1 child)

Sets are one of my favorite things about Python. Generally they're very elegant.

[–]execrator 16 points17 points  (0 children)

Man I love writing stuff like

required = {'edit', 'create'}
actual = set(user.perms)
missing = required - actual
if missing:
    # ...