Recent Posts
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- 3d
- math
- clean code
- cs
- 머신러닝
- CV
- 자료구조
- Depth estimation
- SSL
- pytorch
- PRML
- Python
- GAN
- Torch
- computervision
- Front
- algorithm
- dl
- FineGrained
- FGVC
- ML
- classification
- REACT
- Vision
- nerf
- 알고리즘
- 딥러닝
- web
- Meta Learning
- nlp
- Today
- Total
목록property (1)
KalelPark's LAB

Property - 파이썬에는 내장함수로 property()와 데코레이터인 @Property가 존재합니다. property()를 사용하면서 필드명을 사용하는 것처럼 메서드를 호출할 수 있습니다. class Person: def __init__(self, first_name, last_name, age): self.first_name = first_name self.last_name = last_name self.age = age def get_age(self): return self._age def set_age(self, age): if age < 0: raise ValueError("Invalid age") self._age = age age = property(get_age, set_age) pro..
Python/CLEAN CODE
2023. 1. 1. 20:37