Skip to content

Item 86: Superfluous sys.exit() on examples 3 and 4 #128

Description

@inkarkat

The first two example snippets (pages 419 and 420) have main() return 0 / 0 or 1, but in the following two versions on pages 421-422, main() does not return anything, yet sys.exit(main(sys.argv)) is kept (here and here in the example code). (Likely a copy-and-paste error, and fortunately sys.exit(None) acts like success, too.) It could just invoke main(sys.argv).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions