Commit Graph

4444 Commits

Author SHA1 Message Date
Windel Bouwman
40bbb6be1b Merge pull request #1551 from ChJR/feature/float-repr
Fix float.__repr__()
2019-10-20 21:14:09 +02:00
Windel Bouwman
e8bb4bb5ba Merge pull request #1549 from palaviv/refactor-pystruct
pystruct refactor
2019-10-20 14:11:56 +02:00
Windel Bouwman
618c62d779 Merge pull request #1546 from makarchuk/resize-dict
Implement dict resizing
2019-10-20 11:03:55 +02:00
ChJR
814018f7b6 Fix float.__repr__() method 2019-10-20 17:49:39 +09:00
Windel Bouwman
11e8e6235d Merge pull request #1526 from seeeturtle/itertools
Implement itertools.product
2019-10-20 10:30:40 +02:00
Timur
0df4eed07a Remove hash_index field from DictEntry struct.
It was never usefull and was added in previous commit by mistake
2019-10-20 10:29:11 +03:00
Aviv Palivoda
d0184a7ac2 struct.pack does not allow string as pack parameter 2019-10-20 10:13:40 +03:00
ChJR
fb206a0d2d Add float.__repr__() tests 2019-10-20 16:12:26 +09:00
Aviv Palivoda
a828249fc0 Merge pull request #1548 from Writtic/writtic/module_fmod
Update fmod module of math
2019-10-20 09:52:37 +03:00
johan.park
533aa2bc26 Update fmod module of math
- Implement fmod function with test case
2019-10-20 14:55:23 +09:00
joshua1b
8deb936c22 Implement itertools.product
This implements `itertools.product` of standard library.

Related with #1361
2019-10-20 14:47:22 +09:00
Windel Bouwman
ff54fc88e8 Merge pull request #1547 from Writtic/writtic/module_modf
Improve modf module of math
2019-10-19 11:37:53 +02:00
Timur
84040be5b8 Implement dict resizing
Dict resizing is working by removing all None entries, and filling up
indices map from scratch
2019-10-19 10:19:10 +03:00
johan.park
731186a23d Improve modf module of math
- Add INF, NINF, NAN test case
- Apply code relevant to added the test case on the modf code
2019-10-19 10:36:20 +09:00
Windel Bouwman
d09c768609 Merge pull request #1544 from xarus01/master
Implemented range.__reduce__
2019-10-18 19:32:11 +02:00
Aviv Palivoda
89566ee07b Merge pull request #1543 from palaviv/use-primitives-directly
Use primitives directly
2019-10-18 14:29:10 +03:00
Jack Park
aa27d22a54 Resolved rustfmt error 2019-10-18 07:45:01 +07:00
Jack Park
9a5deb1d5b Removed unused binding 2019-10-18 07:20:01 +07:00
Jack Park
3fdc72de5d Resolved conflict 2019-10-18 07:18:50 +07:00
Jack Park
fcc6635b1f Implemented range.__reduce__ 2019-10-18 07:01:37 +07:00
Aviv Palivoda
ea5381db10 Fix format 2019-10-17 23:38:52 +03:00
Aviv Palivoda
4376993f83 Fix clippy warning 2019-10-17 22:28:11 +03:00
Aviv Palivoda
a6514ac546 Raise IndexError when int overflow in str.__getitem__ 2019-10-17 22:21:17 +03:00
Aviv Palivoda
11650e9fbf Use u64 directly 2019-10-17 19:36:42 +03:00
Aviv Palivoda
da8c3f5ead Use u32 directly 2019-10-17 19:34:29 +03:00
Aviv Palivoda
e89baf8d47 Use usize directly 2019-10-17 19:28:04 +03:00
Noah
2bfb08a83b Merge pull request #1540 from palaviv/random-new-arg-style
Convert random to new arg style
2019-10-17 11:25:30 -05:00
Noah
7980b78e0a Merge pull request #1541 from ashermancinelli/int-sizeof
`int.__sizeof__` from #1426
2019-10-17 11:24:44 -05:00
Aviv Palivoda
ca20acf7a0 Change time module to use primitives directly 2019-10-17 19:17:58 +03:00
Aviv Palivoda
5cde75bec8 Use i64 directly 2019-10-17 19:17:58 +03:00
Asher Mancinelli
ccd61b9d20 Update objint.rs 2019-10-17 08:04:42 -07:00
Aviv Palivoda
37f01fd9ae Simeplify float.__round__ 2019-10-17 17:47:38 +03:00
Aviv Palivoda
ab775485ff Use i32 directly 2019-10-17 17:47:38 +03:00
Aviv Palivoda
3d24635b42 Simplify str.getitem 2019-10-17 17:15:24 +03:00
Aviv Palivoda
16f8dbf87a Either accept any TryFromObject 2019-10-17 17:11:34 +03:00
Aviv Palivoda
70a22ab196 Use isize directly 2019-10-17 17:11:34 +03:00
Aviv Palivoda
cd96d2b292 Fix typo 2019-10-17 12:08:04 +03:00
Windel Bouwman
be4a3f3299 Merge pull request #1514 from alanjds/fix-1132-sys-stdout
`sys.std{in,out,err}` implemented in the most simple way
2019-10-17 07:20:30 +02:00
Windel Bouwman
85ae39f2e4 Merge pull request #1534 from RustPython/coolreader18/yieldfrom-fix
Fix the `yield from` expression
2019-10-17 07:15:44 +02:00
Asher Mancinelli
9459cabcc9 Update vm/src/obj/objint.rs
Co-Authored-By: Noah <33094578+coolreader18@users.noreply.github.com>
2019-10-16 21:16:52 -07:00
Noah
8b31ee573e Merge pull request #1539 from palaviv/io-new-arg-style
Convert io to new arg style
2019-10-16 22:50:46 -05:00
Asher Mancinelli
89c76b1235 parenthesis in calculation 2019-10-16 16:02:34 -07:00
Asher Mancinelli
8fff494926 bits -> bytes 2019-10-16 14:10:20 -07:00
Johan
6270344740 Update isclose module of math (#1532)
- Implement `math.isclose()` function with test case
  - Add `IsCloseArgs` struct for `keyword_only` argument: `rel_tol`, `abs_tol`
- Change order of test case on `math_module.py` for readability
  - Clippy recommends using `std::f64::EPSILON` instead of `==` but purpose is different
- Fix multiline declaration on the function parameters
2019-10-16 23:25:53 +09:00
Robert Berglund
81302ce6c2 impl __sizeof__ for bytearray, int, list, str, dict and set (#1426) 2019-10-16 23:24:36 +09:00
Alan Justino da Silva
7d4ab62b01 Fix typo on sys.__stdout__ and sys.__stderr__ 2019-10-16 16:14:42 +02:00
Jeong YunWon
9f6ccf1ec4 Merge pull request #1537 from palaviv/os-new-arg-style
Change os functions to new arg style
2019-10-16 16:39:33 +09:00
Jeong YunWon
4477e6725e Merge pull request #1528 from youknowone/module-error
Fix module attr error to use python `__name__` instead of rust struct `name`
2019-10-16 12:00:14 +09:00
Aviv Palivoda
1e7fb388d2 Revert os.close drop call 2019-10-15 22:31:29 +03:00
Aviv Palivoda
2930c10979 Convert random to new arg style 2019-10-15 22:22:05 +03:00