Commit Graph

235 Commits

Author SHA1 Message Date
veera venky
1479d6bc77 Added index to tuple 2019-02-07 14:56:14 +05:30
Windel Bouwman
d3158f3db5 Merge pull request #372 from RustPython/eliminate_repeated_to_bigint
Eliminate repeated to bigint
2019-02-07 06:22:58 +01:00
Windel Bouwman
8f2c959143 Merge pull request #368 from ZapAnton/list_doc
list type: Added __doc__
2019-02-06 20:44:39 +01:00
Adam Kelly
fd344ec1e0 Remove unnecessary to_bigint().unwrap() everywhere. 2019-02-06 17:38:01 +00:00
Adam Kelly
a83fd7c1af Add __code__ to functions. 2019-02-06 16:01:07 +00:00
ZapAnton
ca63f899d6 list type: Added __doc__ 2019-02-06 15:18:45 +03:00
Windel Bouwman
03fb016415 Merge pull request #333 from ZapAnton/fix_useless_format
Fixed the 'useless_format' clippy warning
2019-02-06 11:16:21 +01:00
Windel Bouwman
c21772c969 Merge pull request #365 from ZapAnton/int_rxor
int type: Added __rxor__
2019-02-06 10:55:55 +01:00
Windel Bouwman
62cad730d3 Merge pull request #364 from HomerMcMillan/string_is_methods
Fix string is* methods
2019-02-06 10:55:06 +01:00
Windel Bouwman
baa59ec2fc Merge branch 'master' into fix_useless_format 2019-02-06 10:50:07 +01:00
ZapAnton
b682eb939e int type: Added __rxor__ 2019-02-06 12:04:47 +03:00
Homer McMillan
00ef668022 String is* methods return false on empty string #363 2019-02-06 03:15:03 -05:00
Homer McMillan
94dc6ece64 Fix python tests that travis didn't like 2019-02-06 02:42:44 -05:00
Windel Bouwman
040a377d06 Merge branch 'master' into fix_redundant_field_names 2019-02-06 08:14:14 +01:00
Windel Bouwman
a26279111d Merge pull request #353 from OddCoincidence/range-index
Add range.index
2019-02-06 08:00:11 +01:00
Windel Bouwman
f13cb62393 Merge pull request #357 from veera83372/object-methods
Added __doc__ atrribute for object
2019-02-06 07:53:01 +01:00
Windel Bouwman
8a53547e2b Merge pull request #355 from NLincoln/compliant-complex-repr
repr() of complex numbers is compliant with cpython
2019-02-06 07:52:31 +01:00
Windel Bouwman
819e5a01e4 Merge pull request #354 from HomerMcMillan/bytes_iter
Add bytes.__iter__
2019-02-06 07:45:10 +01:00
Homer McMillan
1270aee628 Add is* methods to bytearray 2019-02-06 01:22:23 -05:00
veera venky
3de17b9083 Added __doc__ atrribute for object 2019-02-06 08:35:57 +05:30
Nathan
12e6de0503 repr() of complex numbers is compliant with cpython 2019-02-05 20:59:41 -06:00
Homer McMillan
35a06bc428 Add bytes.__iter__ 2019-02-05 21:44:14 -05:00
Joey Hain
49a23a8483 remove misleading contains method 2019-02-05 16:26:12 -08:00
ben
6d494fb9ee Merge branch 'master' into iter_lazy 2019-02-06 12:46:16 +13:00
ben
6c8ec39882 Make map and filter into proper types 2019-02-06 12:45:14 +13:00
Windel Bouwman
aaf0eab530 Merge pull request #342 from ZapAnton/fix_collapsible_if
Fixed the 'collapsible_if' clippy warnings
2019-02-05 23:34:29 +01:00
ben
6e99ad32db Added tests for when function in filter/map raises StopIteration 2019-02-06 11:12:25 +13:00
ben
f85bc13ded Fix misunderstanding about behaviour if filter function is None 2019-02-06 11:12:25 +13:00
ben
91fcd7782e Make map lazy and accept multiple iterables 2019-02-06 11:12:25 +13:00
ben
8cc6821c44 Make filter lazy 2019-02-06 11:12:25 +13:00
Windel Bouwman
69e3571d0c Merge pull request #341 from ZapAnton/toplevel_ref_arg
Fixed the 'toplevel_ref_arg' clippy warning
2019-02-05 22:42:31 +01:00
Windel Bouwman
3fb0f32a87 Merge pull request #335 from ZapAnton/fix_ptr_arg
Fixed the 'ptr_arg' clippy warnings
2019-02-05 22:36:29 +01:00
Joey Hain
b0a2f6f87d Add range.index 2019-02-05 13:34:54 -08:00
Windel Bouwman
9d5a953c8a Merge pull request #337 from ZapAnton/fix_unneeded_field_pattern
Fixed the 'unneeded_field_pattern' clippy warnings
2019-02-05 22:34:31 +01:00
Windel Bouwman
835a55777b Merge pull request #334 from ZapAnton/fix_len_zero
Fixed the 'len_zero' clippy warnings
2019-02-05 22:31:54 +01:00
ZapAnton
fb9fa27555 Fixed the 'redundant_field_names' clippy warnings
This replaces all the occurrences of the Struct {field : field}
with the Struct {field}.

Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
2019-02-05 21:56:16 +03:00
ZapAnton
b0cbb23b43 Fixed the 'collapsible_if' clippy warnings
Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
2019-02-05 21:49:07 +03:00
ZapAnton
0d3b218237 Fixed the 'toplevel_ref_arg' clippy warning
This replaces all the occurrences of the
'let ref var = another_var' with the
'let var = &another_var'

Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
2019-02-05 21:45:56 +03:00
ZapAnton
526ed98d93 Fixed the 'needless_return' clippy warnings
This replaces all the occurrences of the 'return var;' at
the end of the functions with the 'var'.

Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
2019-02-05 21:39:38 +03:00
ZapAnton
d445e3082a Fixed the 'unneeded_field_pattern' clippy warnings
This replaces all the occurrences of the Struct {field: _} with
the Struct { .. }.

Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern
2019-02-05 21:37:41 +03:00
ZapAnton
1a6840280b Fixed the 'ptr_arg' clippy warnings
This replaces all the occurrences of &<dynamic collection><T>
with the &[T].

Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
2019-02-05 21:22:16 +03:00
ZapAnton
6fb91ddfed Fixed the 'len_zero' clippy warnings
This replaces all the occurrences of the <collection>.len() == 0
with the <collection>.is_empty() and the occurrences of the
<collection>.len() > 0 with the !<collection>.is_empty()

Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
2019-02-05 20:54:49 +03:00
ZapAnton
57e2beef3a Fixed the 'useless_format' clippy warning
This replaces all the occurrences of the format!(<&str>) with the <&str>.to_string()

Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
2019-02-05 20:48:50 +03:00
Windel Bouwman
7941480fca Merge pull request #269 from mrecachinas/add-int-doc
Add int.__doc__ (addresses #261)
2019-02-05 18:26:28 +01:00
Windel Bouwman
fa91cc36e8 Merge pull request #329 from ZapAnton/int_invert
int type: Added __invert__
2019-02-05 18:14:21 +01:00
Windel Bouwman
676f60296d Merge pull request #330 from ichyo/string-len
Use the number of characters instead of bytes for str.__len__
2019-02-05 17:57:58 +01:00
Adam
6ea784e78e Merge pull request #323 from vokar97/handle-index-overflow
Add error handling for objsequence and objstr index overflow (addresses #276)
2019-02-05 16:00:07 +00:00
Adam
aee5090bd2 Merge pull request #321 from HomerMcMillan/tuple_comparisons
Fix error messages in tuple/list comparisons
2019-02-05 15:54:54 +00:00
ichyo
fc779c2e3a Use the number of characters instead of bytes for str.__len__ 2019-02-05 23:26:13 +09:00
ZapAnton
5db2025dec int type: Added __invert__ 2019-02-05 15:20:17 +03:00