Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Introduces "end" keyword to Python.

Project Description
end
===

This module magically introduces `end` keyword to your Python code which marks
the end of a block statement.


Usage
-----

Import "end" module and mark end of blocks with `end`. If you forget to mark them,
`SyntaxError` is raised on import time (not on execution time).

```python
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(10000)
except KeyboardInterrupt:
print('Interrupted')
finally:
print('Bye!')
end

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


Disclaimer
----------

This is a joke module -- never use it.


Known Issues
------------

This will work for most cases, but there are some edge cases.

- Only CPython 2.7 is supported.
- Single-line compound statement is not supported.
- It will malfunction if `__import__` is hooked by someone else.
- Source code must be available to the interpreter.

Again, do not use this in a serious business anyway.


Author
------

Shuhei Takahashi

- Website: https://nya3.jp/
- Twitter: https://twitter.com/nya3jp/


License
-------

Apache 2.0
Release History

Release History

This version
History Node

1.0.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
end-1.0.0.tar.gz (3.1 kB) Copy SHA256 Checksum SHA256 Source Oct 30, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting