Archived
This project has been archived by its maintainers, and is no longer receiving any updates.
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.
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) as case:
if case(0): print 'Awkward...'
if case(2): print '???'
if case(1): print 'Phew! It works!'
Function annotations::
@annotate(a=1, b=2, ret='return annotation')
def x(a, b):
return 0
=====
.. 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.
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) as case:
if case(0): print 'Awkward...'
if case(2): print '???'
if case(1): print 'Phew! It works!'
Function annotations::
@annotate(a=1, b=2, ret='return annotation')
def x(a, b):
return 0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyext-0.3.tar.gz
(5.1 kB
view details)
File details
Details for the file pyext-0.3.tar.gz.
File metadata
- Download URL: pyext-0.3.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e7cb1aaf09363723131c0234551a9696fbfafcd4f66750ddbe72d33a048190c
|
|
| MD5 |
93bbfc25ffcd270ddef2cb8018aba049
|
|
| BLAKE2b-256 |
92fb08a21314cf28ceb9dd7fb858b7315063f31f50a4d338db2ec3b80b09ab31
|