This file contains hidden or 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
from json import loads,dumps | |
def Unicodify(func): | |
βββ | |
Checkes in the incoming data-types and returns unicode values | |
Intended only for strings and JSON Objects | |
βββ | |
def wrapper(obj): | |
if isinstance(obj, str): | |
return loads(obj) | |
elif isinstance(obj, dict): |
This file contains hidden or 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
import math | |
class A(object): | |
cursur = 0.0 | |
def __init__(self,x,y): | |
self.x = x | |
self.y = y | |
def move_forward(self,x,y): | |
x+=1 | |
y+=1 | |
A.cursur += math.sqrt(x**2 + y**2) |
NewerOlder