monchovarela
6/9/2019 - 2:58 AM

Testing functions

import winsound

data = [('juan')]

def observe(func):
    def wrapper(*args, **kwargs):
        print("The function is called")
        func(*args, **kwargs)
        print("Finish call")
    return wrapper

class person():
	def set(self,*args):
		data.append(*args)
	def rm(self,*args):
		data.remove(*args)
	def get(self):
		return data

p = person()

t = lambda a : int(a + 10/a-1)+1

@observe
def init(name,other = {}):
	p.set((name,'pedro'))
	p.set(other)
	p.rm('juan')
	p.set(t(18))
	p.set(int(123))
	p.set('JUAN carlos'.lower())
	print(p.get())

init('moncho',{"title":"hello"})

print(data[0][0])
print(data[1])

frequency = 3500  # Set Frequency To 2500 Hertz
duration = 100  # Set Duration To 1000 ms == 1 second
winsound.Beep(frequency, duration)