Jordan Danford
c67b8bccb9
Expose read
, read_str
, and eval
in Python
...
- Expose `read`, `read_str`, and `eval` in Python
- Add string evaluation example to interop section of docs
- Add test for `eval`
- Explain `eof` keyword argument in `read` docstring
2017-08-05 17:29:15 -07:00
David Schaefer
432d560310
No TypeError from multi-arity defn returning None
2017-08-04 17:08:41 +02:00
gilch
d0530b0e7e
add comment macro
2017-08-03 19:05:38 -06:00
Kodi Arfer
e8ffd41202
Merge pull request #1349 from woodrush/fix-unquote-splice-none
...
Allow `unquote-splice` to accept any false value as empty
2017-08-02 19:50:47 -04:00
gilch
203965d0fa
add #_ discard syntax
2017-08-02 16:55:14 -06:00
Kodi Arfer
ecc974de1e
Implement Python 2 exec
...
The implementation of `hy.core.language.exec` draws code from the `exec_` function in commit f574c7be6ebc80041ef58ca29588f310248ebed4 of the library Six, which is copyright 2010–2017 Benjamin Peterson and licensed under the Expat license.
2017-08-02 13:33:59 -04:00
Hikaru Ikuta
a0224ef8bd
Allow unquote-splice
to accept any false value as empty
2017-08-02 00:50:37 +09:00
Kodi Arfer
2d20a52379
Don't use cond
in the definition of a core macro
...
`cond` itself is a core macro.
2017-07-28 16:58:45 -07:00
gilch
d9a5acbcc9
Merge pull request #1343 from Kodiologist/repl-history-after-exception
...
Save REPL history after an exception
2017-07-26 22:39:30 -06:00
Kodi Arfer
67a4815024
Shadow get
( #1344 )
2017-07-26 21:10:54 -05:00
Kodi Arfer
2f340f8049
Save REPL history after an exception
2017-07-26 14:26:45 -07:00
gilch
0a14410911
Merge pull request #1337 from Kodiologist/shetag
...
Don't try to lex tag-macro calls as shebangs
2017-07-25 12:43:53 -06:00
Kodi Arfer
28ce83524b
Don't try to lex tag-macro calls as shebangs
2017-07-23 11:43:19 -07:00
Kodi Arfer
eea8cf1061
hy-repr: Fix a crash when given a NumPy array
2017-07-20 08:46:42 -07:00
Kodi Arfer
7b94c45e16
Remove an extra parenthesis in hy.contrib.profile
2017-07-20 08:46:37 -07:00
Kodi Arfer
0bbb5f8e34
hy-repr: Support #* and #**
2017-07-19 10:25:24 -07:00
Kodi Arfer
784a44601b
Remove the implementation of apply
2017-07-19 10:18:55 -07:00
Kodi Arfer
75e4ad8304
Remove uses of apply
from /hy
2017-07-17 13:34:42 -07:00
Kodi Arfer
2d863abc85
Implement #* and #** unpacking
2017-07-17 13:34:39 -07:00
Kodi Arfer
801836f6c2
Remove the Python 2 yield-from macro
...
I moved the yield-from tests from native_macros to py3_only_tests.
2017-07-13 08:46:41 -07:00
Kodi Arfer
a979dd85f7
Don't make yield-from
a special form on Python 2
2017-07-13 08:46:41 -07:00
Tuukka Turto
678998f00c
Merge pull request #1321 from Kodiologist/no-str-as-sym
...
Require HySymbols instead of HyStrings in more cases
2017-07-12 22:11:36 +03:00
Ryan Gonzalez
467b300e6c
Remove an outdated comment
2017-07-12 13:56:17 -05:00
Kodi Arfer
b7657e8fa3
Require HySymbols instead of HyStrings more often
2017-07-12 10:57:35 -07:00
Kodi Arfer
5a1e6a7c6a
hy-repr: Support NaN and Inf
2017-07-10 08:50:49 -07:00
Kodi Arfer
bb91b57dca
Require capitalizing NaN and Inf like so
2017-07-10 08:50:49 -07:00
Kodi Arfer
850ba03d1f
Slightly simplify HyREPL
2017-07-03 17:01:12 -07:00
Kodi Arfer
6db3da779e
Don't wrap values while expanding macros
...
This is the compiler's job now.
2017-07-03 17:01:12 -07:00
Kodi Arfer
55986b2033
Auto-promote values to HyObjects in the compiler
2017-07-03 17:01:12 -07:00
Kodi Arfer
4be37b358b
Make lists no longer magical for the compiler
2017-07-03 17:01:12 -07:00
Kodi Arfer
f55fcf43bd
Add a docstring for hy-eval
...
It's just a copy of the documentation for hy.core.langauge.eval.
2017-07-03 17:01:12 -07:00
Kodi Arfer
ca95194240
Change eval
from a special form to a function
2017-06-27 08:14:29 -06:00
Kodi Arfer
f2278cf2f0
Support PYTHONDONTWRITEBYTECODE
2017-06-26 19:00:08 -06:00
Kodi Arfer
26d1b3f72e
Don't parse 5.attr or :foo.attr as symbols
2017-06-23 08:30:37 -07:00
gilch
6cd3201421
rename sharp macros to tag macros
2017-06-22 22:48:46 -06:00
gilch
20c26a52e4
make sharp macros take arbitrary identifiers
...
Previously, only a single character was allowed.
2017-06-22 22:46:24 -06:00
neil-lindquist
d3df17d9d8
Modify cond to support single argument branches
2017-06-10 08:30:53 -07:00
Kodi Arfer
5bf9ecfc5a
Forbid (try) and (try BODY)
2017-05-25 20:48:09 -05:00
Kodi Arfer
dffa2811e6
Return from the else
clause of a try
form
...
I overhauled the documentation of `try` while I was editing it.
2017-05-25 20:48:09 -05:00
Kodi Arfer
81d89c9d12
Enforce the standard order of try
elements
2017-05-25 20:48:09 -05:00
Kodi Arfer
0d2749d5cd
Minor cleanup in hy.compiler: try, except
2017-05-25 20:48:09 -05:00
Kodi Arfer
2eb81864df
Make all files comply with license-header policy
2017-04-27 14:16:57 -07:00
Kodi Arfer
d3fa375052
Migrate from Nose to pytest
2017-04-26 14:00:11 -07:00
Kodi Arfer
ec0902b649
Set __file__ of bytecode imports
2017-04-25 09:30:13 -07:00
Kodi Arfer
a27d737e1c
Drop support for Pythons 3 older than 3.3
2017-04-24 14:22:13 -07:00
Kodi Arfer
5aaa7d92d8
Shorten hy._compat
2017-04-24 14:18:56 -07:00
Kodi Arfer
ef3bad7e03
Drop support for Python 2.6
2017-04-24 14:18:56 -07:00
Kodi Arfer
4c38e2c9dd
Rename reader macros to "sharp macros" ( #1282 )
...
They're not actually reader macros, since their arguments are parsed s-expressions, like a regular macro, not pre-parsed source text.
2017-04-21 10:07:48 -05:00
Kodi Arfer
ad94343e4a
Merge pull request #1269 from Kodiologist/bytecode
...
Automatically read and write bytecode
2017-04-14 13:52:07 -07:00
Kodi Arfer
a87b23b4e8
Check the magic number of bytecode files
2017-04-14 13:38:38 -07:00