Python 객체지향 스타일로 로직 작성하기
# 두 개 리스트를 가진 인스턴스를 생성해서 BO, Data, UI 구조의 객체지향 프로그래밍 class Data():def __init__(self, this_list):self.my_list = this_list def get_data(self):return self.my_list class Calc():def __init__(self, one, two):self.one = oneself.two = two def get_calc_list(self):new_list = [x + y for x, y in zip(self.one.get_data(), self.two.get_data())]return Data(new_list).get_data() class UI():def __init__(self):self..
Python
2016. 5. 6. 09:46