(help, version, options, doc)
| 474 | |
| 475 | |
| 476 | def extras(help, version, options, doc): |
| 477 | if help and any((o.name in ('-h', '--help')) and o.value for o in options): |
| 478 | print(doc.strip("\n")) |
| 479 | sys.exit() |
| 480 | if version and any(o.name == '--version' and o.value for o in options): |
| 481 | print(version) |
| 482 | sys.exit() |
| 483 | |
| 484 | |
| 485 | class Dict(dict): |