Daniel Watkins
67b7cc2e45
Expand function snippet tests for kwargs
2018-08-31 16:00:09 -04:00
Daniel Watkins
003f99c70d
Fix assertion messages in func_defaults snippet
2018-08-31 15:57:09 -04:00
Daniel Watkins
d807ad0c77
Implement kwargs in function calls
2018-08-31 15:46:07 -04:00
Daniel Watkins
e8afd0ad90
Use PyFuncArgs::default() when we want an empty struct
2018-08-31 15:46:07 -04:00
Daniel Watkins
dcc3f30db9
Reject calls with positional arguments after keyword arguments
2018-08-31 15:46:07 -04:00
Daniel Watkins
764e0af433
Emit CallFunctionKw from compiler for kwarg calls
2018-08-31 15:46:07 -04:00
Daniel Watkins
b4662925b7
Naively parse keyword arguments
...
This doesn't enforce ordering of non-keyword and keyword arguments, and
doesn't actually use the keywords (the arguments will still be passed
through in order as positional).
2018-08-31 15:46:07 -04:00
Daniel Watkins
5f0c8a343f
Merge pull request #114 from RustPython/objtyp
...
Move builtin types to own directory
2018-08-31 15:37:37 -04:00
Windel Bouwman
8ed132cadb
Fix issue #112
2018-08-31 21:10:49 +02:00
Windel Bouwman
b2ab49376a
Change get_value to take a reference to a reference
2018-08-31 20:49:52 +02:00
Windel Bouwman
f453c749ec
Move builtin types to own directory
2018-08-31 20:31:25 +02:00
Windel Bouwman
c687db079a
Merge pull request #107 from OddBloke/stdlib
...
Store Rust stdlib modules on VirtualMachine and lazily-load them
2018-08-31 19:47:47 +02:00
Windel Bouwman
59bf1cb348
Merge pull request #113 from OddBloke/json
...
Rework json.dumps to support subclasses
2018-08-31 19:37:37 +02:00
Windel Bouwman
a1a649c7c1
Merge pull request #106 from OddBloke/constant_tuple
...
Add a tuple Constant (and fix some stack leakage)
2018-08-31 19:31:49 +02:00
Windel Bouwman
69a8592b0b
Merge pull request #104 from OddBloke/macro
...
Use arg_check! in objtype
2018-08-31 19:29:43 +02:00
Daniel Watkins
406b9a1c57
Add PyObjectSerializer method to reduce clutter
2018-08-30 19:02:25 -04:00
Daniel Watkins
3dca52cc4a
Rework json.dumps to support subclasses
...
We can currently only construct instances of string subclasses, so
that's the only code path that is actually tested.
Fixes #91 .
2018-08-30 19:02:25 -04:00
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