Commit Graph

2982 Commits

Author SHA1 Message Date
Aviv Palivoda
e89baf8d47 Use usize directly 2019-10-17 19:28:04 +03: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
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
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
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
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
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
coolreader18
672f146de4 Properly implement gen.throw() 2019-10-15 14:00:08 -05:00
Windel Bouwman
a1e3fe4e63 Merge pull request #1538 from palaviv/platform-new-arg-style
Convert platform to new arg style
2019-10-15 20:58:35 +02:00
Noah
c31b3b2af9 Use the first arg of StopIteration as yield from return value 2019-10-15 13:58:08 -05:00
Windel Bouwman
6f59609160 Merge pull request #1533 from RustPython/coolreader18/cleanupstuff
Clean up the REPL and CodeFlags
2019-10-15 20:56:57 +02:00
Aviv Palivoda
dda4ab00e3 Convert io.{TextIOWrapper, BufferedReader} to new arg style 2019-10-15 21:52:08 +03:00
Aviv Palivoda
1ad9ee8792 Simplify os.close 2019-10-15 21:38:28 +03:00
Aviv Palivoda
e8b0185251 Convert io.FileIO to new arg style 2019-10-15 21:27:42 +03:00
ChJR
b2126829e9 Add repeat count support to struct.pack() (#1518)
* Add struct.pack() repeat count test

* Add repeat count support to struct.pack()

* Refactor parse_format_codes()

* Refactor parse_format_codes() again
2019-10-15 19:25:51 +02:00
Aviv Palivoda
6d08b4f553 Convert io.{IOBase, BufferedReader} to new arg style 2019-10-15 19:03:15 +03:00
Aviv Palivoda
f0e30f2ff3 Convert platform to new arg style 2019-10-15 18:39:09 +03:00
Aviv Palivoda
a435bb1f81 Change os.error to new arg style 2019-10-15 18:21:46 +03:00
Aviv Palivoda
9d5cdf23b3 Change os.close to new arg style 2019-10-15 18:16:38 +03:00
Seo Sanghyeon
6887365092 Update lexical to 4 2019-10-15 21:40:59 +09:00
coolreader18
c08f11ad1b Change FunctionOpArg to CodeFlags, stored in CodeObject 2019-10-14 20:20:52 +00:00
Windel Bouwman
6f624c6f95 Merge pull request #1521 from janrg/round_to_n_decimals
Implement round(number, digits) for digits != 0
2019-10-14 20:19:40 +02:00
Windel Bouwman
2205fec2ff Merge pull request #1524 from dan-fritchman/1175-extend-os
Add os.system
2019-10-14 20:15:28 +02:00
Dan Fritchman
2df54f3a10 Re-order os module exports 2019-10-14 18:00:38 +02:00
Dan Fritchman
899f6e78e5 Pre-underscore os.system _vm 2019-10-14 17:57:55 +02:00
janrg
4fd38e6220 Add test snippets, fix rounding for very small numbers 2019-10-14 17:06:07 +02:00
Jeong YunWon
12b3c855f9 Fix module attr error to use python __name__ instead of rust struct field name 2019-10-14 11:13:40 +09:00
Noah
d42d422566 Merge pull request #1505 from youknowone/defer-new-int-clone
Defer BigInt::clone() for new_int
2019-10-13 14:27:37 -05:00
Dan Fritchman
e94f3f372d Add os.system 2019-10-13 15:45:17 +02:00
janrg
122aa96887 Fix linter errors 2019-10-13 14:09:17 +02:00
janrg
458fa3cb7b Fix formatting 2019-10-13 13:22:19 +02:00
janrg
b858ae8776 Implement round(number, digits) for digits != 0 2019-10-13 13:04:24 +02:00
kluid
958e9abb57 Add some csv.reader kwarg options
'delimiter' and 'quotechar'
2019-10-13 17:18:17 +09:00
Windel Bouwman
336364c80d Merge pull request #1318 from youknowone/ast-module
ast module
2019-10-12 12:51:26 +02:00
Windel Bouwman
23075e5420 Merge pull request #1501 from youknowone/bool-equal
introduce and adapt vm.identical_or_equal to test `is` or else `__eq__`
2019-10-12 12:47:57 +02:00
Windel Bouwman
242f0ffb8c Merge pull request #1512 from sanxiyn/indent
Implement IndentationError
2019-10-12 12:07:56 +02:00
Jeong YunWon
78dce22c51 compile() with PyCF_ONLY_AST is available without compiler 2019-10-12 18:24:28 +09:00
Jeong YunWon
2f1fb16da1 Add mode to ast::parse 2019-10-12 18:12:36 +09:00
Jeong YunWon
16c3c78b69 introduce and adapt vm.identical_or_equal to test is or else __eq__ 2019-10-12 17:53:26 +09:00
Jeong YunWon
7333fd13b5 Lib/ast.py 2019-10-12 14:57:50 +09:00
coolreader18
6d681a4d59 Implement object.__reduce__ 2019-10-11 15:48:56 -05:00
coolreader18
be274ec39e Fill in _os.environ with the correct types of strings 2019-10-11 15:47:29 -05:00