Skip to content

VIP: Allow raise without reason string #1902

@iamdefinitelyahuman

Description

@iamdefinitelyahuman

Simple Summary

Allow use of raise without a reason string.

Motivation

  1. I see no technical reason to enforce requiring a revert string. A bare raise statement is parseable.
  2. Requiring a reason for raise but not assert is inconsistent.
  3. The requirement is easily circumvented:
assert False

Specification

Fairly self-explanatory. The following syntax should compile:

if cond:
    raise

Backwards Compatibility

Will not cause any issues.

Copyright

Copyright and related rights waived via CC0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions