티스토리 뷰

Python

Data Transfer Object

techbard 2016.05.11 15:29

# Data Transfer Object


class Pool:

def __init__(self, **kwargs):

self.__dict__ = kwargs


m = Pool(one=1, two=2, three=3)

m.four=4

print(m.one)

print(m.two, m.three)


# 결과

1

2 3


댓글
댓글쓰기 폼
공지사항
Total
407,535
Today
9
Yesterday
19
«   2019/09   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          
글 보관함