내가 작업중인 모듈의 예제에서 docopt
을 사용하고 있으며, 모든 옵션 기본값이 하나만 제외하고 작동하고 있습니다. 문제를 식별하려고 시도하는 옵션을 포함하고있는 모든 코드를 수정했지만 기본값은 사용하지 않습니다!내 docopt 옵션의 기본값이없는 이유는 무엇입니까?
내 옵션은 다음과 같습니다 차단 :
Options:
--help Show this message and exit
--version Show version info and exit
-w WIDTH --width=WIDTH The out to out width of the deck (feet) [default: 73]
-g GIRDERS --girders=GIRDERS The number of girders [default: 8]
-h HEIGHT --height=HEIGHT The height of the girders (inches) [default: 56]
-t THICK --thick=THICK The deck thickness (inches) [default: 8]
-a ADIM --adim=ADIM The "A" dimension, max deck thick @ CL girder [default: 12]
-l LSLP --leftslope=LSLP The left-hand deck slope (ft/ft) [default: -0.02]
-r RSLP --rightslope=RSLP The right-hand deck slope (ft/ft) [default: -0.02]
-c --center Indicates pivot point is at center of bridge
-o OFFSET --offset=OFFSET The offset of pivot point from center [default: 0]
girders
옵션은 기본값이 없습니다!
나는 여러 번 this question을 다시 읽었지만 관련이없는 것 같습니다.
내 추측 : 각 옵션 설명 앞에 적어도 * 2 * 공백이 있어야합니다. – jfs
내 추측 역시 - 동일한 문제가있었습니다. http://stackoverflow.com/questions/13995352/why-are-defaults-not을 참조하십시오. -docop-my-command-line-argument-dictionary from docop/20283560 # 20283560 – hargriffle