Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 699
    • Issues 699
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

Due to a massive storm of spam, registration on this instance now requires explicit administrator approval. Sorry for the added friction, we're also looking into automatic filtering options.

  • PyPyPyPy
  • pypypypy
  • Merge requests
  • !267

sys.exit() should produce a SystemExit with code is None

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Bitbucket Importer requested to merge bitbucket/merged-pr-267 into branch/py3.3 Aug 12, 2014
  • Overview 3
  • Commits 1
  • Pipelines 0
  • Changes 2

Created originally on Bitbucket by numerodix (Martin Matusiak)

Was already merged in Bitbucket before import, marked as merged by the import user

The thing here is that while the default exit code for Python is 0, that doesn't mean the argument to SystemExit in case of sys.exit() ought be 0. It ought to be None.

I would like to still keep the kwarg exitcode=0 for "educational purposes" (introspection/doc generation), but I don't see how to keep that in place and still be able to distinguish "having passed 0" from "having passed no argument, assigned 0 as default and overwritten as None".

I also wonder if we need some subprocess-like tests to verify the exit code of the process in the various cases (?)

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: bitbucket/merged-pr-267