Jeong YunWon
6c0f852b62
Refactor pymethod return types to be smaller as possible
2019-10-11 03:27:23 +09:00
Jeong YunWon
1fc5dcb5bf
Result<T, PyObjectRef> -> PyResult<T>
2019-10-11 02:59:47 +09:00
Timur Makarchuk
027a25c123
Merge branch 'master' into string.__repr__
2019-10-05 22:14:34 +03:00
Timur Makarchuk
4b962b89d7
Implement some __ne__ methods ( #1446 )
...
* Implement some __ne__ methods
Added test snippets from `__ne__` methods
* Fix incompatability in str.__eq__ befaviour
Previously "".__eq__(1) returned "False", which is not the case in
cpython.
Not it's returning 'NotImplemented', as it should
2019-10-06 00:50:02 +09:00
Timur
70fb3f69ef
cpython compatible "".__repr__
...
Fixes #1390
2019-10-05 01:17:17 +03:00
Noah
d9cdb32e49
Merge pull request #1441 from dralley/fix-strings
...
Handle unicode indexing by character, not by grapheme
2019-10-01 19:01:41 -05:00
Daniel Alley
02ea0b629f
Handle unicode indexing by character, not by grapheme
...
Python isn't grapheme aware, so for compatibility sake, we shouldn't be
either.
closes #1417
2019-10-01 12:37:16 -04:00
Noah
d22cac2dd8
Rename new slots to tp_new
2019-09-29 23:14:37 -05:00
coolreader18
c46b5b50bd
Fix weirdness with type.__new__()/type()/metaclass.__new__()
2019-09-29 23:14:31 -05:00
j30ng
b056044b5a
Fix CI Build in Rust 1.38.0
2019-09-28 03:24:47 +09:00
Noah
0def37d78e
Make PyString.value private
2019-09-19 17:45:48 -05:00
Noah
54cfb71d74
Add a lazily calculated hash field to PyString
2019-09-19 15:58:15 +00:00
coolreader18
83db646ff4
Fix str.split's args
2019-09-15 00:16:43 -05:00
HyeockJinKim
2f96995f30
Fix unsupported operand type of str problem
...
Modify panic! to Err for unsupported operand type of str problem
Fixes #1365
2019-09-12 06:52:13 +09:00
Windel Bouwman
c7566897ec
Merge pull request #1315 from jmg7173/1224-not_implemented_pattern
...
#1224 not implemented pattern (for now)
2019-08-26 19:40:00 +02:00
MinGyo Jung
ee6450e3a7
issue-1224 Change to map_err instead of match
2019-08-26 14:47:46 +09:00
coolreader18
825ee4bc7c
Fix tests/clippy
2019-08-23 17:52:38 -05:00
coolreader18
dacd119d4a
Fix str.[r]split
2019-08-23 17:34:56 -05:00
MinGyo Jung
e826894f02
#1224 Error handling for not implemted features
2019-08-21 17:18:11 +09:00
Jeong YunWon
82d6fc81ff
PySliceableSequence return type can be non-Self sequence
2019-08-19 14:43:00 +09:00
Windel Bouwman
b6f522d917
Allow &str to be used a dictionary key.
2019-08-17 17:11:23 +02:00
Noah
aa14a6bc48
Merge pull request #1273 from jmg7173/master
...
Add floating point formatting
2019-08-16 03:29:31 -05:00
MinGyo Jung
2c6c2b8084
Remove unreachable pattern
2019-08-16 16:41:53 +09:00
Noah
7a680c32a8
Merge pull request #1285 from ChJR/feature/simplify-error-formatting/str.__mod__
...
Simplify error formatting of str.__mod__ method.
2019-08-16 02:39:59 -05:00
ChJR
3972239ae5
Simplify error formatting of str.__mod__ method.
2019-08-16 16:16:25 +09:00
ChJR
1dceae9205
Add str.__rmod__() method. #190 ( #1262 )
...
* Add str.__rmod__ method.
* Add tests for str.__rmod__ method.
* Improve test for str.__rmod__ method.
* Change str.__rmod__ method return value type.
* Format with rustfmt.
* Remove not required code of str.__rmod__ method.
* Improve with clippy.
2019-08-16 08:40:32 +02:00
MinGyo Jung
bc64016b02
Merge branch 'master' of https://github.com/rustpython/rustpython
2019-08-16 15:39:10 +09:00
MinGyo Jung
f4e19889a1
#1224 Fix not suitable tests and solve CI failure
2019-08-16 15:38:56 +09:00
MinGyo Jung
26168bc1e5
#1224 Add integer supporting for float formatting
2019-08-15 18:53:46 +09:00
MinGyo Jung
1114d27e28
#1224 Add formating for floating point and test
...
Just supports "%f" types
2019-08-15 17:39:03 +09:00
Windel Bouwman
d06dec77ea
Attempt to reduce the size of the pyobject.rs files by splitting out builtin types.
2019-08-14 19:08:47 +02:00
coolreader18
64f2c8d2e6
Fix '' % {}
2019-08-08 17:41:39 -05:00
Marcin Pajkowski
1f59532f82
Silent clippy with allowing range_plus_one
...
PySliceableSequence trait methods require Range<usize>
as arguments
2019-07-24 19:32:05 +02:00
Marcin Pajkowski
0e033ad93f
Add str.__reversed__ method
2019-07-24 19:03:02 +02:00
Marcin Pajkowski
db8eb7b8c3
Implement str.__iter__ and str.__next__
2019-07-24 03:17:05 +02:00
Windel Bouwman
704b15750e
Add optimize flag to ignore assert statements.
2019-07-12 18:41:25 +02:00
coolreader18
9204035d97
Cover up bare trait objects with a dyn
2019-07-10 09:41:58 -05:00
Maxim Kurnikov
347d48198e
fix remaining clippy warnings
2019-07-07 06:27:07 +03:00
Maxim Kurnikov
848714e18e
save passed object into the first .args parameter for dict/mappingproxy KeyError
2019-06-26 23:40:24 +03:00
Michel Heily
c972e7c73e
Remove a mistakenly commited debug print
2019-06-21 12:57:58 +03:00
Michel Heily
6fe2c43bf7
Move lambda to its own function in do_cformat
2019-06-17 19:35:09 +03:00
Michel Heily
fca4178353
Avoid unnecessary allocation in modulo formatting
2019-06-17 19:35:09 +03:00
Michel Heily
5d38b9b624
Simplify error handling for CFormatString::from_str
2019-06-17 19:35:09 +03:00
Michel Heily
8d612f3a36
Add %c formatting
2019-06-17 19:35:09 +03:00
Michel Heily
e374aff0bc
Support '*' for width and precsision for printf-style formatting
2019-06-17 19:35:09 +03:00
Michel Heily
d5ffecea32
objstr: Improve errors for modulo format
2019-06-17 19:35:09 +03:00
Michel Heily
481b044883
Support modulo formatting of numbers and string types
2019-06-17 19:35:09 +03:00
Michel Heily
fe6c1488d9
Start implementing str.__mod__
2019-06-17 19:35:09 +03:00
coolreader18
cb2fe657a9
Merge pull request #1014 from mkurnikov/cleanup-get-method-error-handling
...
Cleanup get_method() error handling
2019-06-11 17:43:58 -05:00
coolreader18
740e8387b8
Merge pull request #1027 from alanjds/format-bang
...
Feature: str.format accepting !r, !s and !a
2019-06-10 10:56:00 -05:00