python 생성자 오버로딩 하는법

컴퓨터 2018. 8. 2. 09:08

python 생성자 오버로딩 하는법
https://goo.gl/GtTYTA

 

class Simulation:
    """Simulation class"""
    def __init__(self, *args, **kwargs):
        self.title = kwargs['title']

        if 'childNodes' in kwargs:
            self.childNodes = kwargs['childNodes']

'컴퓨터' 카테고리의 다른 글

The Software Development Kit Manager  (0) 2018.08.23
파워포인트 동영상 녹화  (0) 2018.08.13
Linux Clusters Overview  (0) 2018.06.28
fortune cowsay lolcat @centos6  (0) 2018.06.12
컴퓨터 마더보드 배터리  (0) 2018.06.05