jweinst1
7/21/2016 - 11:46 PM

decorators.py

#practice for wrappers and decorators in python

def foo(lst, roo):
	return lst + roo

def a(func, x, y):
	return func(x, y)
	
class practice:
	
	def __init__(self):
		self.a = 5
		self.b = [4 for elem in range(self.a)]
		
	def fuse(self, other):
		return self.b + other
		
		
"""   a(practice.fuse, practice(), [5])
=> [4, 4, 4, 4, 4, 5]"""