Skip to content

Instantly share code, notes, and snippets.

View nizox's full-sized avatar
🚂

Nicolas Vivet nizox

🚂
View GitHub Profile
>>> def a(order):
... todo = []
... for i in order:
... def g(i):
... return lambda x: x[i]
,,, todo.append(g(i))
... def b(x):
... return [do(x) for do in todo]
... return b
class User(Document):
id = IntegerField(aliases=["_id"])
name = StringField()
user = User(name="test")
_id = db.user.insert(user)
user.update_from_dict({ "_id": _id })
class SomeOtherData(Document):
uniqueid = StringField(aliases=["_id"])