Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # b_func_hack.py
- def set_pets(vars=None, refs=locals()):
- if vars:
- if '[' in str(vars):
- for var in vars:
- i = len(refs)-6
- refs['pet_0%s' % i] = var
- else:
- i = len(refs)-6
- refs['pet_0%s' % i] = vars
- try:
- print pet_09
- except:
- 0
- try:
- print pet_08
- except:
- 0
- try:
- print pet_07
- except:
- 0
- try:
- print pet_06
- except:
- 0
- try:
- print pet_05
- except:
- 0
- for z in (pet_04, pet_03, pet_02, pet_01, pet_00):
- print z
- print
- 0
- set_pets(['dog', 'cat', 'fish', 'fox', 'monkey'])
- set_pets(('bird'))
- set_pets(('PYTHON !!!'))
- print refs
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement