< Tensorflow > What is the implementation of GRU in tensorflow
< Deeplearning > Break up backpropagation

< Python > Some python tricks you may never use But you should know

namedtuple

If you are too lazy to create a class but you still want to use a variable that can act as a class object, then you should use namedtuple:

1
2
3
4
from collections import namedtuple
user = namedtuple('u', [1, 2, 3])
ztq = user(a='a', b='b',c='c')
print(ztq.a, ztq.b, ztq.c)

result:

1
(1,2,3)
Read more