Last active
June 9, 2016 15:36
-
-
Save dolohow/a8f1ab67fa60f0ac6a8a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Worker: | |
def __init__(self, name=None, pay=None): | |
self.name = name | |
self.pay = pay | |
bob = Worker() | |
is_logged = True | |
def login_required(func): | |
def a(): | |
#aa = func() | |
aa = '' | |
if is_logged: | |
return '[OK] ' + aa | |
return '[FAIL] Access denied for \'' + aa + '\'' | |
return a | |
@login_required | |
def add_user(): | |
return 'Adding a user' | |
print(add_user()) | |
value = D['x'] if 'x' in D else 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment