equal
deleted
inserted
replaced
85 if shortopt: |
85 if shortopt: |
86 so = '-' + shortopt |
86 so = '-' + shortopt |
87 lo = '--' + longopt |
87 lo = '--' + longopt |
88 |
88 |
89 if isinstance(default, fancyopts.customopt): |
89 if isinstance(default, fancyopts.customopt): |
90 default = default.defaultvalue |
90 default = default.getdefaultvalue() |
91 if default and not callable(default): |
91 if default and not callable(default): |
92 # default is of unknown type, and in Python 2 we abused |
92 # default is of unknown type, and in Python 2 we abused |
93 # the %s-shows-repr property to handle integers etc. To |
93 # the %s-shows-repr property to handle integers etc. To |
94 # match that behavior on Python 3, we do str(default) and |
94 # match that behavior on Python 3, we do str(default) and |
95 # then convert it to bytes. |
95 # then convert it to bytes. |