Dlaczego moja opcja docopt nie ma wartości domyślnej?
używamdocopt
w przykładzie modułu, nad którym pracuję, i wszystkie wartości domyślne opcji działają z wyjątkiem jednego. Zmodyfikowałem cały kod zawierający i otaczający opcję, próbując zidentyfikować problem, ale nie będzie on przyjmował wartości domyślnej!
Mój blok opcji wygląda tak:
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]
Thegirders
opcja nigdy nie ma wartości domyślnej!
Przeczytałem ponownieto pytanie kilka razy, ale wydaje się to niezwiązane.