Skip to content

Instantly share code, notes, and snippets.

@lithbitren
lithbitren / inherited_point.py
Last active May 28, 2020 20:13
坐标继承变更
class Point(dict):
def __init__(self, x, y):
self['x'] = x
self['y'] = y
def __getattr__(self, attr):
return self[attr]() if callable(self[attr]) else self[attr]
def __setattr__(self, attr, value):
@lithbitren
lithbitren / hello_world.py
Last active May 28, 2020 08:55
hello world
print('hello world')