Daniel Watkins
934612314b
Add or make public get_elements for sequences/dicts
2018-08-30 18:51:54 -04:00
Daniel Watkins
e0b71b8d93
Add JSON snippet tests for None
2018-08-30 18:26:04 -04:00
Daniel Watkins
98a93b477d
Add tuple tests to json_snippet.py
2018-08-30 16:34:28 -04:00
Daniel Watkins
5e3c22e182
Only load Rust stdlib modules on import
...
Fixes #108
2018-08-30 11:50:21 -04:00
Daniel Watkins
8756c04cfe
Store Rust stdlib modules on VirtualMachine
...
This means we only have to load the modules once at startup.
Fixes #90 .
2018-08-30 11:15:09 -04:00
Daniel Watkins
489a52cc2b
Only emit defaults tuple if we have some
2018-08-29 22:57:01 -04:00
Daniel Watkins
d4461d7703
Add bytecode::Constant::Tuple
2018-08-29 18:51:25 -04:00
Daniel Watkins
c8c59cbafc
Use arg_check! in objtype
2018-08-29 18:08:02 -04:00
Daniel Watkins
72a21a3440
Merge pull request #103 from RustPython/objtyp
...
Change print to use __str__ and add __str__ to object
2018-08-29 14:59:24 -04:00
Windel Bouwman
9fe8b68f22
Merge pull request #101 from OddBloke/nightly
...
Run (non-voting) tests against Rust nightly in Travis
2018-08-29 20:54:17 +02:00
Windel Bouwman
adf04a5452
Minor fixes
2018-08-29 20:34:54 +02:00
Windel Bouwman
072a5182e5
Some style issues and add __len__ to str
2018-08-29 20:17:44 +02:00
Windel Bouwman
2f3947808e
Change print to use __str__ and add __str__ to object
2018-08-29 19:25:12 +02:00
Daniel Watkins
3b1536277e
Bump version of petgraph in Cargo.lock to 0.4.13
...
This should fix #102 (i.e. compilation on rust nightly).
2018-08-29 12:38:39 -04:00
Daniel Watkins
352c8a57c5
Run (non-voting) tests against Rust nightly in Travis
2018-08-29 12:11:51 -04:00
Daniel Watkins
26023c7317
Merge pull request #99 from RustPython/objtyp
...
Alternative operator implementation based on typ instead of kind
2018-08-29 11:43:04 -04:00
Windel Bouwman
af84076979
Add check to assert issue #92 is fixed
2018-08-29 17:39:20 +02:00
Windel Bouwman
0f8ba73777
Merge pull request #100 from OddBloke/kwargs
...
Add support for function argument defaults
2018-08-29 15:20:57 +02:00
Daniel Watkins
cb173c1fa8
Update and expand Rust tests for function parsing
2018-08-29 08:58:20 -04:00
Daniel Watkins
51e2db6097
Add snippet to test default arguments
2018-08-29 08:58:20 -04:00
Daniel Watkins
85d2dd2997
Add support for default argument syntax
...
The enforcement of the ordering of default/non-default arguments happens
in the compiling step, but should perhaps eventually be pushed back in
to the parsing phase.
2018-08-29 08:58:20 -04:00
Daniel Watkins
2cecd362fe
Add support for defaults to bytecode, compiler and VM
2018-08-29 08:58:20 -04:00
Windel Bouwman
81cbe66085
Moved pow method
2018-08-29 13:23:42 +02:00
Windel Bouwman
201281554f
Move common arithmatic into functions which check on object type
2018-08-29 12:44:45 +02:00
Windel Bouwman
fb47ce36e9
Alternative operator implementation based on typ instead of kind
2018-08-28 20:26:02 +02:00
Windel Bouwman
0787115d07
Merge pull request #98 from OddBloke/ctx_getters
...
Implement getters for PyContext types
2018-08-28 19:33:32 +02:00
Daniel Watkins
1c0e1ed6b5
Implement getters for PyContext types
...
Currently, all users of the *_type attributes on PyContext have to
immediately clone the pointer before they can use it; this pushes that
cloning in to getters to reduce the clone-clutter across the codebase.
2018-08-27 17:31:05 -04:00
Daniel Watkins
4f14411a0f
Merge pull request #97 from RustPython/objtyp
...
Move to more usage of type checking by typ
2018-08-27 16:53:46 -04:00
Windel Bouwman
819b88efb6
Move to more usage of type checking by typ
2018-08-27 22:40:29 +02:00
Daniel Watkins
12ebed8599
Move builtin_print to correct alphabetical position
2018-08-27 16:12:43 -04:00
Windel Bouwman
fdcc4c8992
Merge pull request #95 from RustPython/bools_3
...
Bools 3
2018-08-27 22:05:58 +02:00
Windel Bouwman
9b29ae058c
Merge pull request #96 from OddBloke/macro
...
Introduce optional parameter support in arg_checks!
2018-08-27 21:59:22 +02:00
Windel Bouwman
9b1c44edac
Merge pull request #86 from RustPython/exceptions
...
Add issiubclass
2018-08-27 21:52:46 +02:00
Daniel Watkins
970acbe47a
Use optional arg_checks! for bool_new
2018-08-27 09:55:34 -04:00
Daniel Watkins
f7b43ea617
Add optional positional arguments to arg_check!
2018-08-27 09:55:21 -04:00
Daniel Watkins
8f74759129
Modify arg_check! syntax to allow expansion of option types
2018-08-27 09:55:21 -04:00
Adam Kelly
a59c4536d9
unittests for compilation of if statements.
2018-08-27 14:26:13 +01:00
cthulahoops
3590d150e3
Merge pull request #93 from OddBloke/macro
...
Introduce arg_check! usage in more places
2018-08-27 14:23:23 +01:00
Adam Kelly
1e6ed66019
Implement compile_test to avoid extra evaluations of bools.
2018-08-27 14:04:53 +01:00
Daniel Watkins
55402e27ad
Use arg_check! in json module
2018-08-26 21:55:35 -04:00
Daniel Watkins
5176ebd3ed
Use arg_check! macro in objlist
2018-08-26 21:55:35 -04:00
Daniel Watkins
113f9be403
Move arg_check macro to a shared module
...
This allows it to be used by more than just the builtins module.
2018-08-26 21:55:35 -04:00
Daniel Watkins
09b89f95f4
Merge pull request #88 from OddBloke/macro
...
Add a macro for builtins argument checking
2018-08-26 21:55:18 -04:00
Daniel Watkins
87cf9ee0e6
Temporary fix for type elision in subtraction
...
This is the code path this is used in the tests; a full fix should
follow.
2018-08-26 17:19:58 -04:00
Daniel Watkins
d4693097d4
Use explicit types in arg type checking macro
2018-08-26 16:53:52 -04:00
Daniel Watkins
9db736e089
Update arg checking macro to perform type checking of arguments
2018-08-26 16:53:52 -04:00
Daniel Watkins
7105549c69
Add initial argument count checking macro
2018-08-26 16:53:52 -04:00
Windel Bouwman
3f7986c811
Address review comments
2018-08-26 22:01:00 +02:00
Windel Bouwman
b8552a22e5
Merge branch 'master' of https://github.com/RustPython/RustPython into exceptions
2018-08-26 21:51:51 +02:00
Windel Bouwman
2c14e92e24
Merge pull request #89 from OddBloke/json
...
Basic json module implementation in rust
2018-08-26 21:46:57 +02:00