Hy fork
Go to file
Kodi Arfer e4a7b317e1 Make fn work like lambda and remove lambda (#1228)
* with-decorator: Allow a `setv` form as the form to be decorated

This feature is of dubious value by itself, but it's necessary to allow `defn` to create a lambda instead of a `def`.

* Make `fn` work the same as `lambda`

That is, allow it to generate a `lambda` instead of a `def` statement if the function body is just an expression.

I've removed two uses of with_decorator in hy.compiler because they'd require adding another case to HyASTCompiler.compile_decorate_expression and they have no ultimate effect, anyway.

In a few tests, I've added a meaningless statement in `fn` bodies to force generation of a `def`.

I've removed `test_fn_compiler_empty_function` rather than rewrite it because it seems like a pain to maintain and not very useful.

* Remove `lambda`, now that `fn` does the same thing
2017-02-22 17:36:52 -06:00
bin Make hy2py public. 2014-04-30 01:51:21 +03:00
docs Make fn work like lambda and remove lambda (#1228) 2017-02-22 17:36:52 -06:00
hy Make fn work like lambda and remove lambda (#1228) 2017-02-22 17:36:52 -06:00
scripts Drop a set of brackets from with. 2015-10-01 10:08:04 +02:00
tests Make fn work like lambda and remove lambda (#1228) 2017-02-22 17:36:52 -06:00
.coveragerc fix CI by moving exclude_lines .coveragerc setting to a new [report] § 2015-09-23 22:44:19 -07:00
.dockerignore Add initial .dockerignore file 2014-10-06 13:37:51 -06:00
.gitignore Revert "Modernized." (#1085) (#1188) 2016-12-27 09:09:58 -06:00
.mailmap added new mail 2014-09-08 14:56:04 +02:00
.travis.yml Test Python 3.6 apart from nightly (#1133) 2016-10-12 16:11:46 -06:00
AUTHORS Docs: Hy <-> Python interop fix #1061 (#1218) 2017-02-10 17:11:21 -08:00
CONTRIBUTING.rst Use HTTPS for github.com, docs.python.org and notes.pault.ag URLs (#1219) 2017-02-07 13:25:40 -06:00
Dockerfile update my email 2014-11-22 10:28:31 -05:00
LICENSE Removing my name from the license. 2013-04-05 20:04:36 -04:00
make.bat Implement yield-from in Python 2.x as a macro 2014-11-20 20:48:15 -06:00
Makefile Ignore a new Flake8 whitespace error (#1158) 2016-11-27 09:54:59 +02:00
MANIFEST.in Add the manifest. (#1186) 2016-12-25 14:17:32 -06:00
NEWS Make fn work like lambda and remove lambda (#1228) 2017-02-22 17:36:52 -06:00
README.md Include original XKCD title text in comic image 2016-05-09 13:58:43 -04:00
requirements-dev.txt Make ci builds faster by splitting requirements 2014-05-13 22:47:19 +05:30
requirements-travis.txt Remove tests for contrib.botsbuildbots 2016-12-29 08:35:54 -08:00
setup.cfg Add universal Wheel support. 2014-03-18 10:33:10 +02:00
setup.py Use try instead of if in setup.py 2017-01-24 08:31:38 -08:00
tox.ini Ignore a new Flake8 whitespace error (#1158) 2016-11-27 09:54:59 +02:00

Hy

Build Status Downloads Version Coverage Status

XKCD #224

Lisp and Python should love each other. Let's make it happen. Try it.

Hylarious Hacks

OK, so, why?

Well. Python is awesome. So awesome, that we have so many tools to alter the language in a core way, but we never use them.

Why?

Well, I wrote Hy to help people realize one thing about Python:

It's really awesome.

Oh, and lisps are neat.

Cuddles the Hacker

(fan art from the one and only doctormo)

Project