Skip to content

Latest commit

 

History

History
62 lines (42 loc) · 971 Bytes

README.md

File metadata and controls

62 lines (42 loc) · 971 Bytes

end

This Python module magically introduces end keyword which marks the end of a block statement.

PyPI version Build Status

Usage

Import "end" module and mark ends of blocks with end. When you forget to mark any, SyntaxError is raised in import time (not in execution time).

import end

def func():
    for i in range(3):
        print(i)
    end
end

with open('a.txt') as f:
    print(f.read())
end

try:
    time.sleep(3)
except KeyboardInterrupt:
    print('Interrupted')
finally:
    print('Slept')
end

if 28 > 3:
    print('nya-n')
# end is missing here. SyntaxError is raised!

Warning

This is a joke module --- never use it.

Author

Shuhei Takahashi

License

Apache 2.0