Overloading (1) 썸네일형 리스트형 [python] 함수 오버로딩(overloading)? python에서 클래스를 만들고 오버로딩(overloading)을 해볼려고 했더니.. 응? 'Duplicated signature' 라고 뜬다. (현재 python 2.7 + eclipse 사용) 오버로딩이 안되나보다 방법은? 오버로딩은 아니지만, 함수의 argument를 다양한 타입으로 여러개를 받을 수 있도록 할 수 있다. class test: def function(self, *arglist): print arglist print arglist[0] 사용할 때는 function('a',1.0, (1,2)) 그냥 함수 호출하면 된다. arglist[0] = 'a' arglist[1] = 1.0 arglist[2] = (1,2) 로 들어가 있을 것이다. 좀더 advanced하게 사용하려면.. def f.. 이전 1 다음