Paul R. Tagliamonte
3e0ff4a9b2
Adding @vladimir-g to AUTHORS
2013-04-13 10:50:55 -04:00
Gergely Nagy
5d895c2005
Making (import) a lot smarter
...
With these changes, the import function will become a lot smarter, and
will combine all of import, import-from and import-as in a hyly lispy
syntax:
(import sys os whatever_else)
(import [sys [exit argv]] [os :as real_os]
[whatever_else [some_function :as sf]])
That is, each argument of import can be:
- A plain symbol, which will be imported
- A list, which will be handled specially
If the argument is a list, the first element will always be the module
name to import, the second member can be either of these:
- A list of symbols to import
- The ':as' keyword
- Nothing
If it is the ':as' keyword, the third argument must be an alias. If it
is a list of symbols to import, we'll iterate through that list too. If
any symbol is followed by an ':as' keyword, we'll pick all three, and
treat the third member as an alias. If there is nothing else in the
list, we'll import the module as-is.
All this combined fixes #113 .
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2013-04-13 15:06:31 +02:00
Vladimir Gorbunov
f30e7cd99b
Fix hyc
2013-04-13 16:28:37 +04:00
Paul R. Tagliamonte
1e98889604
removing site reqs file
2013-04-12 23:49:08 -04:00
Paul R. Tagliamonte
f295b10f52
Updating yield.
2013-04-12 23:48:58 -04:00
Paul R. Tagliamonte
454323ae04
removing site target
2013-04-12 23:46:28 -04:00
Paul R. Tagliamonte
eb30c5857e
Removing the website updater.
2013-04-12 23:16:20 -04:00
Paul R. Tagliamonte
49937cf66a
update eww-arrr-el
2013-04-12 23:11:53 -04:00
Paul R. Tagliamonte
a3c6f12b86
Screw it; buyer beware.
2013-04-12 23:08:22 -04:00
Paul R. Tagliamonte
a71f166610
Merge branch 'future_division' of github.com:khinsen/hy into pr-106
2013-04-12 23:07:40 -04:00
Paul R. Tagliamonte
0071733019
I've moved site to https://github.com/hylang/shyte
2013-04-12 23:00:54 -04:00
Nicolas Dandrimont
30c0b25512
Add a unicode string handling test
2013-04-12 20:58:56 +02:00
Nicolas Dandrimont
d5db2840ad
Don't punycode pure unicode strings.
2013-04-12 20:42:40 +02:00
Nicolas Dandrimont
65c08c8c7d
Factor str_type into hy.util
2013-04-12 20:42:39 +02:00
Nicolas Dandrimont
8bc8a4a170
Merge remote-tracking branch 'khinsen/float_and_complex_2' into paultag/master
...
Conflicts:
hy/lex/states.py
tests/lex/test_lex.py
2013-04-12 18:16:43 +02:00
Paul Tagliamonte
e4e61a463e
Adding in the new models.
2013-04-12 09:18:25 -04:00
Paul Tagliamonte
1f4ed473d3
Style fixes; function declashing.
2013-04-12 09:11:56 -04:00
Paul Tagliamonte
3ec828e660
Merge branch 'float_and_complex' of git://github.com/khinsen/hy into pr-109
2013-04-12 09:09:38 -04:00
Paul Tagliamonte
c15d8750e8
Merge branch 'f/hy.models.keyword' of git://github.com/algernon/hy into pr-101
2013-04-12 08:58:38 -04:00
Paul Tagliamonte
94d2c381a5
Merge branch 'lexer_extensions' of git://github.com/khinsen/hy into pr-98
2013-04-12 08:55:13 -04:00
Konrad Hinsen
c30a116416
Add "from __future__ import division" to Python code generated by hy2py
...
This is mainly to make we don't forget this. The current state of hy2py
is more a proof-of-concept than a usable tool anyway.
2013-04-12 08:00:08 +02:00
Konrad Hinsen
0c56885d42
Use __future__.division for all Hy code
...
Fixes #106
Note: This is implemented by replacing all calls to Python's
builtin "compile" function by calls to hy.importer.compile_,
which adds the "future division" flag. Anyone using "compile"
in future work will have to remember this.
2013-04-12 05:23:25 +02:00
Paul R. Tagliamonte
db3e2bd346
updating the nested mangles
2013-04-11 22:25:23 -04:00
James King
9ff3b128b4
Got &rest working, tests pass
...
Did a little house cleaning in lex states.py too and started removing
stupid print() statements.
2013-04-11 12:00:27 -04:00
Gergely Nagy
2ea2cd1a8d
tests: Test that keywords do not clash with normal strings
...
Signed-off-by: Gergely Nagy <algernon@balabit.hu>
2013-04-11 15:13:40 +02:00
Gergely Nagy
702811c69a
Implement :keyword support
...
This implements keywords, ":" prefixed symbols that are able to look
themselves up in a collection. They're internally stored as strings that
start with "\ufdd0".
This fixes #22 .
Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2013-04-11 15:13:26 +02:00
Konrad Hinsen
15ae8c83f1
Fix names of methods compile_float and compile_complex
2013-04-11 14:41:09 +02:00
Julien Danjou
a729b52155
Merge pull request #110 from khinsen/integer_division
...
Implement integer division operator
2013-04-11 02:11:42 -07:00
Konrad Hinsen
e3a9909a7e
Implement integer division operator
...
Fixes #107
2013-04-11 10:09:15 +02:00
Konrad Hinsen
ac0a597742
Tests for float and complex constants
2013-04-11 09:54:59 +02:00
Konrad Hinsen
1d73ecb792
Handle float and complex constants in addition to integer
2013-04-11 09:45:45 +02:00
Konrad Hinsen
fd99f497a4
Fixed typo in test_lex.py
2013-04-11 09:40:57 +02:00
Konrad Hinsen
f036b360a6
Fixed typo in test_lex.py
2013-04-11 08:26:56 +02:00
Paul R. Tagliamonte
eee65f3051
Update to the style.
2013-04-10 23:11:54 -04:00
Paul R. Tagliamonte
b65f78a0c7
Adding in this barf of a hack beacuse it pleases me.
2013-04-10 23:06:55 -04:00
Paul R. Tagliamonte
f6b94b1b40
Avoiding breaking PyPy. Wat.
2013-04-10 23:00:42 -04:00
Paul R. Tagliamonte
d25d354281
Adding in on-the-fly-importing.
2013-04-10 22:51:58 -04:00
Paul R. Tagliamonte
b361a230cb
Why is the blacklist not working?
2013-04-10 22:00:51 -04:00
Paul R. Tagliamonte
644f2756f3
Fixing the raised Exception.
2013-04-10 21:49:27 -04:00
Paul R. Tagliamonte
1adf64839a
Updating travis; exceptions.
2013-04-10 21:44:23 -04:00
Paul R. Tagliamonte
65db83d1ff
moving atoms around to make it easier for internals.
2013-04-10 20:04:58 -04:00
Paul R. Tagliamonte
34e38728ca
Merge branch 'master' into paultag/feature/eval
2013-04-10 20:02:57 -04:00
Paul R. Tagliamonte
96711cb270
Merge branch 'master' into feature/site-corrections
2013-04-10 19:47:33 -04:00
James King
484a96abae
WIP - Move _parse_lamba_list to the functiondef
2013-04-10 16:52:28 -04:00
James King
160eaaa543
Merge branch 'develop' into feature/lambda-list-keyword
2013-04-10 15:14:45 -04:00
James King
1506ff16ad
Added ast pretty printer
2013-04-10 15:08:44 -04:00
James King
e41624d47d
Minor correction to repl template. Added link to docs.
2013-04-10 11:11:05 -04:00
Konrad Hinsen
b1f66b6893
Handle float and complex constants in addition to integer
2013-04-10 14:26:16 +02:00
Konrad Hinsen
4f98ea22e8
Allow atoms (integers, booleans, symbols) as top-level expressions
2013-04-10 13:08:32 +02:00
Konrad Hinsen
753460884e
Accept strings as top-level expressions
2013-04-10 12:32:39 +02:00