Hy fork
Go to file
Kodi Arfer 14fddbe6c3 Give require the same features as import (#1142)
Give `require` the same features as `import`

You can now do (require foo), (require [foo [a b c]]), (require [foo [*]]), and (require [foo :as bar]). The first and last forms get you macros named foo.a, foo.b, etc. or bar.a, bar.b, etc., respectively. The second form only gets the macros in the list.

Implements #1118 and perhaps partly addresses #277.

N.B. The new meaning of (require foo) will cause all existing code that uses macros to break. Simply replace these forms with (require [foo [*]]) to get your code working again.

There's a bit of a hack involved in the forms (require foo) or (require [foo :as bar]). When you call (foo.a ...) or (bar.a ...), Hy doesn't actually look inside modules. Instead, these (require ...) forms give the macros names that have periods in them, which happens to work fine with the way Hy finds and interprets macro calls.

* Make `require` syntax stricter and add tests

* Update documentation for `require`

* Documentation wording improvements

* Allow :as in `require` name lists
2016-11-03 09:35:58 +02:00
bin Make hy2py public. 2014-04-30 01:51:21 +03:00
docs Give require the same features as import (#1142) 2016-11-03 09:35:58 +02:00
eg Drop a set of brackets from let. 2015-10-01 10:08:04 +02:00
hy Give require the same features as import (#1142) 2016-11-03 09:35:58 +02:00
scripts Drop a set of brackets from with. 2015-10-01 10:08:04 +02:00
tests Give require the same features as import (#1142) 2016-11-03 09:35:58 +02: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 Generate hy.version using git describe 2016-10-12 17:11:44 -07: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 Add Jakub Wilk to AUTHORS 2016-05-16 14:57:56 -07:00
CONTRIBUTING.rst Remove invalid ) from URL 2016-10-09 13:01:08 +02: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 Add PHONY targets; wrap call to recursive make; add path to find. 2016-10-04 21:53:59 -04:00
NEWS Fix typos 2016-07-01 16:44:12 +02: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 Add a Botsbuildbots function 2014-09-05 12:37:51 +02:00
setup.cfg Add universal Wheel support. 2014-03-18 10:33:10 +02:00
setup.py Changed version punctuation for PEP 440 compliance 2016-10-13 13:41:14 -07:00
tox.ini experiment: can we convince Travis CI to test with nightly Python? 2016-09-22 23:24:14 -07: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