Replies: 2 comments
-
최악"관용적"이지 않은 경우에 positional, keyword 섞어서 쓰기. 관용적의 범위: 외부 패키지(모델 필드 정의, requests 등) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
가독성에 큰 차이가 있거나, 실행 상 반드시 필요한 이유가 아니라면 keyword argument를 권장합니다. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
@Kirade
인자가 많을 때는 웬만하면 keyword argument를 선호합니다. 한 가지로 통일
self.assertEqual() 같은 건 keyword를 쓰기 애매하다.
@donghyun0218
인자 이름이 전달하는 지역변수 이름과 겹치면, positional을 쓰기도 합니다.
@twins1040
라이브러리 예시에서 positional로 쓰는 경우 존재.
@jseop-lim
매개변수 순서 바꾸는 리팩토링할 때 keyword가 유리하다. 88자 제한으로 줄 늘이는 경우가 많음.
Do 규칙을 정하기보다, Don't 규칙을 정합시다.
Beta Was this translation helpful? Give feedback.
All reactions