Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/orf/inliner
Automagically inline python methods
https://github.com/orf/inliner
Last synced: 16 days ago
JSON representation
Automagically inline python methods
- Host: GitHub
- URL: https://github.com/orf/inliner
- Owner: orf
- License: mit
- Created: 2013-07-31T15:02:05.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-06-17T15:47:48.000Z (over 9 years ago)
- Last Synced: 2023-03-12T06:24:29.220Z (over 1 year ago)
- Language: Python
- Size: 148 KB
- Stars: 95
- Watchers: 8
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
Inliner inlines Python function calls. Proof of concept for [this blog post](http://tomforb.es/automatically-inline-python-function-calls)
from inliner import inline
@inline
def add_stuff(x, y):
return x + ydef add_lots_of_numbers():
results = []
for i in xrange(10):
results.append(add_stuff(i, i+1))In the above code the add_lots_of_numbers function is converted into this:
def add_lots_of_numbers():
results = []
for i in xrange(10):
results.append(i + i + 1)