Skip to content

Instantly share code, notes, and snippets.

@louisswarren louisswarren/is_set.py
Last active Oct 10, 2017

Embed
What would you like to do?
Well, it's either set or it's not set, right?
def foo(*args, flag=not set):
if flag is set:
print("Special path - flag is set")
else:
print("Normal path")
foo()
foo(flag=set)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.