파이썬 객체지향 프로그래밍 심층 가이드
클래스 속성 타입 힌트
from typing import List, Dict, Optional
class Sample:
def __init__(self, value_a: int, value_b: str, items: List[int], mapping: Dict[str, str], opt_value: Optional[float] = None):
self.val_a = value_a
self.val_b = value_b
self.items = items
self.mapping = mapping
self.opt_val = ...
7월 12일 21:12에 게시됨