일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- ros2 foxy parameters
- Nav2 document
- 22.04 ros2 설치
- nav2 doc behavior trees
- ubuntu ros2 설치
- ubuntu humble 설치
- docker foxy
- ROS FOXY 튜토리얼
- nav2 behavior trees
- ros2 foxy understanding parameters
- ros2 foxy docker
- nav2 행동트리
- CodeUp
- ros2 param list
- ROS2 Humble 설치
- 코드업
- ros2 remapping
- ros2 foxy 튜토리얼
- Python
- ros2 foxy tutorial
- ros2 튜토리얼
- ros2 param load
- error
- ros2 humble install
- Foxy tutorial
- ros2 param get
- ros2 param set
- CODEUP 6073
- foxy nav2
- ros2 param dump
Archives
- Today
- Total
BAN2ARU
[Python] Vars( ) 함수 본문
Vars([object])란?
python의 기본 내장함수로서 모듈, 클래스, 클래스 인스턴스 객체(__dict__속성을 가지는 객체)에 대해 __dict__ (dictionary 형태)로 return해 주는 함수임.
만약 [object]를 선언하지 않으면 locals()처럼 동작되어 현재 지역 변수에 대해 __dict__(dictionary 형태)로 return함.
Vars 함수 예제
class SellList:
snack = 1000
ice_cream = 700
coke = 1200
candy = 1500
print(vars(SellList))
# 출력 화면
{'__module__': '__main__', 'snack': 1000, 'ice_cream': 700, 'coke': 1200, 'candy': 1500, '__dict__': <attribute '__dict__' of 'SellList' objects>, '__weakref__': <attribute '__weakref__' of 'SellList' objects>, '__doc__': None}
728x90
'Language > Python' 카테고리의 다른 글
Comments