##
6.20.4 Callback Options

If `optparse`'s built-in actions and types just don't fit the bill for you, but it's not worth extending `optparse` to define your own actions or types, you'll probably need to define a callback option. Defining callback options is quite easy; the tricky part is writing a good callback (the function that is called when `optparse` encounters the option on the command line).

Subsections

- 6.20.4.1 Defining a callback option
- 6.20.4.2 How callbacks are called
- 6.20.4.3 Error handling
- 6.20.4.4 Examples