Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Simple Python extensions.

Project Description
PyExt
=====

.. image:: https://travis-ci.org/kirbyfan64/PyExt.png
:target: https://travis-ci.org/kirbyfan64/PyExt

Several simple extensions that add some nifty features to Python.

NEWS: There is now a PyExt newsgroup on Google Groups. See https://groups.google.com/forum/#!forum/pyext.

Some features:

- Function overloading
- Switch statement
- Runtime module creation
- Tail recursion removal
- Python 2 function annotations
- Python 2 safe tuple unpacking

Examples:

Function overloading::

@overload.argc(1)
def f(a): print 'Function 1 called'
@overload.argc(2)
def f(a, b): print 'Function 2 called'

f(1)
f(1, 2)

Switch statement::

with switch(1):
if case(0): print 'Awkward...'; case.quit() # case.quit() is the same as break
if case(2): print '???'
if case(1): print 'Phew! It works!'
if case.default(): print 'Ummmm...'

Function annotations::

@fannotate('Return annotation', a=1, b=2)
def x(a, b):
return 0

TODO:

- Add some more tests

.. note:: Please ignore this project's messy commit history(several commits under invalid_email_address, about 20 commits labeled Initial). I was trying to use hg-git and kept goofing stuff up.
Release History

Release History

This version
History Node

0.6

History Node

0.5.1

History Node

0.5

History Node

0.4

History Node

0.3.1

History Node

0.3

History Node

0.2

History Node

0.1

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
pyext-0.6.tar.gz (7.3 kB) Copy SHA256 Checksum SHA256 Source Feb 9, 2014
pyext-0.7.tar.gz (7.8 kB) Copy SHA256 Checksum SHA256 Source May 27, 2014

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