Zhao Shenyang
2375392962
Add 'replace_hy_obj' to safely replace Hy objects
...
Currently '.replace' method is used to replace hy objects. This is not
safe when we are not sure if the 'obj' in 'obj.replace(other)' is an
instance of HyObject.
In these cases, we can use function 'replace_hy_obj(obj, other)'
instead. This function will try to wrap 'obj' if it's not an instance of
HyObject.
This also means that we need a wrapping function in hy.models'. Hence I
moved the '_wrap_value' function from hy.macros into hy.models. To avoid
circular importing, the wrapper functions are provided individually by
each model type's own file.
2015-01-24 08:16:38 +08:00
Berker Peksag
8d6f9c3d84
Merge pull request #756 from icholy/master
...
Fix issues with tab completion.
2015-01-19 19:30:47 +02:00
Ilia Choly
7ef4d37169
Fix completion bugs
...
* freezing issue
* missing __name__
* reader & macro completion
* improve underscore to dash conversion
* python 3/2 string compatibility
2015-01-19 12:17:12 -05:00
Matthias Pall Gissurarson
7be22e361b
removed guard as it matches cond almost exactly, added case
2015-01-18 12:37:50 +00:00
Matthías Páll Gissurarson
a3670a8d57
added flow macros
2015-01-17 22:46:23 +00:00
PauletnomailgaT
f70d9d43f2
Merge pull request #759 from icholy/fix-koan
...
fix typos in koan
2015-01-15 15:59:56 -05:00
Ilia Choly
925a1dd313
fix typos in koan
2015-01-15 15:06:10 -05:00
Abhishek L
11b308abb6
Merge pull request #757 from shrayasr/new-author
...
Merge master on to pr/757
2015-01-15 10:02:59 +05:30
Shrayas
f54fca11b0
Adding Shrayas to AUTHORS
2015-01-15 09:43:34 +05:30
Berker Peksag
050c0257fd
Merge pull request #751 from shrayasr/typo-fix
...
Fix typos in tutorial docs
2015-01-15 06:00:16 +02:00
Berker Peksag
8457c348e6
Merge pull request #755 from icholy/master
...
Adapt attribute completion from IPython completer
2015-01-14 23:22:37 +02:00
Ilia Choly
a5654e33ee
Adapt attribute completion from IPython completer
2015-01-14 16:22:17 -05:00
Morten Linderud
7829b8752c
Merge pull request #753 from Tritlo/issue752
...
Added a fix for nested decorators. Fixes #752
2015-01-14 22:10:12 +01:00
Matthías Páll Gissurarson
1d5b455491
Added a fix for nested decorators. Fixes #752
2015-01-14 19:42:02 +00:00
Shrayas
ee4fecdafe
Fix typo
...
It was mistyped as lisP comprehensions instead of lisT
comprehensions
2015-01-14 22:16:26 +05:30
Kevin Yap
19b55384f8
Correct indentation level of code blocks
...
Also, remove hard tabs from code blocks.
2015-01-02 21:05:02 -08:00
Kevin Yap
d684ea1eed
Miscellaneous fixes to transplanted style guide
2015-01-02 20:25:07 -08:00
Kevin Yap
112a075d89
Match heading/subheading style to rest of Hy docs
2015-01-02 19:58:46 -08:00
Kevin Yap
a160c74a42
Transplant style guide from hylang/hy-style-guide
2015-01-02 19:56:07 -08:00
Christopher Allan Webber
34fb8a778c
Merge pull request #737 from ALSchwalm/master
...
Add Adam Schwalm to authors list
2014-12-29 09:52:45 -06:00
Adam Schwalm
a3e88b13cf
Add Adam Schwalm to authors list
2014-12-29 09:49:23 -06:00
Christopher Allan Webber
c037c7bdb0
Merge pull request #736 from ALSchwalm/multiline-str
...
Add support for multi-line strings in interpreter
2014-12-29 09:44:08 -06:00
Adam Schwalm
f1df108b31
Add support for multi-line strings in interpreter
2014-12-28 23:38:38 -06:00
Christopher Allan Webber
706376277f
Explaining that :keyword syntax is for post 0.10.1 only
2014-12-23 15:05:36 -06:00
Christopher Allan Webber
cacc14a7be
Removing trailing whitespace from example
2014-12-23 14:39:40 -06:00
Christopher Allan Webber
12270ecaa3
paultag likes iter(exprs) better than exprs.__iter__()
...
We do what the BDFL says lest he shoot us with magic wizard sticks.
2014-12-23 14:32:03 -06:00
Christopher Allan Webber
6ec89af988
Dashes! Dashes everywhere! ... in the tutorial
...
The tutorial used underscores in Hy code everywhere.
Updated all examples to use dashes, as per Hy convention.
2014-12-23 14:27:38 -06:00
Christopher Allan Webber
d98e4fd733
Implement keyword argument passing... (foo-func 1 2 :kw1 "bar") works!
...
This code is heavily, *heavily* based off of Guillermo Vaya
(willyfrog)'s work... instead of defining its own keyword arg though, it
uses the "standard" :kwarg type, which is the main difference from
willyfrog's original branch.
Included tests and some documentation in the tutorial.
Also documented "apply" separately as an example of reproducing
*args and **kwargs.
2014-12-23 14:07:02 -06:00
Christopher Allan Webber
96c591ff9d
Gender-neutralizing line with "Mrs", which is a problematic title
...
See http://cognoscenti.wbur.org/2014/09/30/gender-politics-feminism-ms-miss-mrs-amy-carleton
as a light introduction to this.
2014-12-22 11:01:32 -06:00
Berker Peksag
c51e44d564
Merge pull request #726 from kirbyfan64/travis3
...
Fix Travis with PyPy (again)
2014-12-19 03:53:31 +02:00
Ryan Gonzalez
1cd7904754
Fix Travis with PyPy (again)
2014-12-18 12:49:53 -06:00
Berker Peksag
e3aac14cf9
Merge pull request #715 from ALSchwalm/master
...
Fix error when 'let' context contains a non-symbol non-list
2014-12-18 10:48:51 +02:00
Adam Schwalm
52334c0b62
Fix error when 'let' context contains a non-symbol non-list
2014-12-18 02:15:41 -06:00
unmerged
41e5175781
Added nonlocal
keyword for python3.
2014-12-14 23:14:19 +03:00
unmerged
cfa805c102
global
now takes multiple arguments.
2014-12-14 23:13:44 +03:00
Berker Peksag
b35fd7d5da
Merge pull request #717 from algernon/f/defn-better-errors
...
Better error messages for fn/defn w/o arglists
2014-12-12 19:25:42 +02:00
Gergely Nagy
6b3c552df4
Better error messages for fn/defn w/o arglists
...
When (fn) or (defn) does not get an arglist as first/second parameter,
emit a more descriptive error message, rather than an ugly traceback.
Fixes #716 .
Reported-by: Joakim Tall
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2014-12-12 13:28:28 +01:00
Morten Linderud
e56a8d86aa
Merge pull request #711 from berkerpeksag/update-travis
...
Remove branches configuration from .travis.yml.
2014-12-11 22:50:02 +01:00
Berker Peksag
36f64b822b
Remove branches configuration from .travis.yml.
...
"debian" branch has been already deleted.
2014-12-10 19:08:22 +02:00
Morten Linderud
2bf723a5d1
Merge pull request #708 from iKevinY/readme-changes
...
Various changes to README.
2014-12-08 17:10:51 +01:00
Kevin Yap
50363e04f5
Miscellaneous changes to README
...
- Updated badges to utilize Shields
- Added alt-text to images
- Changed version/downloads badges to link to PyPI
- Use Markdown list to enumerate Hylarious Hacks
2014-12-08 07:38:13 -08:00
Paul Tagliamonte
0dfa9123a2
Merge branch 'master' into pr/705
2014-12-07 14:21:06 -05:00
Paul Tagliamonte
65f1434fc6
Merge branch 'master' into pr/706
2014-12-07 14:19:38 -05:00
Bob Tolbert
ffd85bcc3e
Fixes a long-standing bug in import under Python 3.3 and later.
...
Our MetaImporter was being inserted at the end of sys.meta_path.
For Python prior to 3.3, this was fine since sys.meta_path
was empty by default. As of the completion of PEP 302 in Py3.3 and
later, there are several importers registered by default. One of
these was trying (and failing) to import simple Hy modules,
resulting in a failure to import anything inside __init__.hy.
This change simply inserts the Hy-specific importer at the front
of the list.
This was noted in issue #620 (great catch @algernon)
2014-12-07 11:02:48 -07:00
Bob Tolbert
54ce193c41
Merge pull request #702 from berkerpeksag/add-clint
...
Add clint as a dependency.
2014-12-07 10:58:30 -07:00
Morten Linderud
bba4a63d55
Merge pull request #701 from berkerpeksag/remove-3.2
...
Remove Python 3.2 from classifiers.
2014-12-07 17:35:34 +01:00
Berker Peksag
cd93c0b03e
Merge pull request #704 from iKevinY/doc-changes
...
Fixes to documentation (language & contributor modules)
2014-12-07 12:36:58 +02:00
Kevin Yap
8c0ac0862f
Adhere to CPython's documentation guidelines
...
- Inline code is written using ``double backticks``
- Italicized text uses *asterisks* rather than `single backticks`
- Function parameters are italicized rather than written as inline code
2014-12-07 02:09:43 -08:00
Kevin Yap
d50485710c
Change documentation code block language to Hy
2014-12-07 02:03:35 -08:00
Nathan Woodrow
41806895b2
Add macro expansion in defclass
2014-12-07 11:52:09 +10:00