Adam Kelly
e68dbf6705
Ints aren't mutable, change int.__init__ to int.__new__
2018-09-02 10:50:03 +01:00
Adam Kelly
dd24727c0e
Use __eq__ methods inequality too.
2018-09-01 22:29:20 +01:00
Adam Kelly
dc021fd1f2
Json library produces invalid objects - commenting broken tests.
2018-09-01 21:54:19 +01:00
Adam Kelly
8d8816ce04
Merge branch 'master' into equality
2018-09-01 20:46:22 +01:00
Windel Bouwman
304c410412
Merge pull request #117 from RustPython/objtyp
...
Add bytes object class
2018-09-01 19:50:47 +02:00
Adam Kelly
811fc2e9c8
Fix objsequence bug - returns the wrong type when slicing.
2018-09-01 17:35:33 +01:00
Adam Kelly
86ea663317
Bug-fix - False formats as True.
2018-09-01 17:10:18 +01:00
Adam Kelly
8780d58857
Define __eq__ for lists and tuples.
2018-09-01 17:10:00 +01:00
Adam Kelly
28f8cdbda9
Define __eq__ for basic types.
2018-09-01 17:09:20 +01:00
Adam Kelly
c06c3efbd5
Switch vm _eq to use __eq__.
2018-09-01 17:08:05 +01:00
Adam Kelly
8c28e1e051
Call method needs &str not &String.
2018-09-01 15:02:39 +01:00
Windel Bouwman
bcf5e8acc9
Repair tuple get elements
2018-09-01 10:37:25 +02:00
Windel Bouwman
f563856dc4
Add some tuple class methods
2018-09-01 10:19:51 +02:00
Windel Bouwman
40cf7f4579
Move more objects to obj folder
2018-09-01 10:00:55 +02:00
Windel Bouwman
5cdd0ab7b8
Check list elements on int type
2018-09-01 09:54:58 +02:00
Windel Bouwman
999c6258e6
Merge branch 'master' of https://github.com/RustPython/RustPython into objtyp
2018-09-01 09:26:08 +02:00
Windel Bouwman
4132f3371e
Merge pull request #115 from OddBloke/kwargs
...
Implement kwargs in function calls
2018-09-01 08:45:44 +02:00
Windel Bouwman
e98b89aa07
Merge pull request #118 from OddBloke/none
...
Implement None == None
2018-09-01 08:42:49 +02:00
Daniel Watkins
bd12982b06
Implement None == None
...
Fixes #111
2018-08-31 18:35:00 -04:00
Daniel Watkins
4333ce07ef
kwarg_names should explicitly be strings so unwrap them directly
2018-08-31 16:52:04 -04:00
Daniel Watkins
e69d4542da
Convert PyFuncArgs.kwargs to a Vec
...
Instead of an Option<Vec>
2018-08-31 16:42:02 -04:00
Daniel Watkins
ad0d03b7cf
Fix and expand function parsing Rust tests
2018-08-31 16:23:25 -04:00
Windel Bouwman
f9538af3f2
Add bytes object class
2018-08-31 22:10:10 +02:00
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