Windel Bouwman
dd20263fba
Merge pull request #1123 from corona10/fix_complex_hash
...
complex: Fix hash function to work correctly
2019-07-10 19:27:59 +02:00
coolreader18
9204035d97
Cover up bare trait objects with a dyn
2019-07-10 09:41:58 -05:00
Dong-hee Na
d349d254f6
complex: Fix hash function to work correctly
...
Currently, hash(3.1-4.2j) or hash(3.1+4.2j) is crashed due to
overflow error on RustPython.
This patch will fix this issue.
2019-07-10 09:21:19 +09:00
coolreader18
5b32dfbed9
Fix clippy and azure pipelines
2019-07-08 13:24:06 -05:00
coolreader18
fbeedb72bd
Fix seq_mul with negative numbers
2019-07-07 15:38:54 -05:00
coolreader18
9d3fa18ec8
Add __mul__ to deque
2019-07-07 15:38:47 -05:00
coolreader18
5153ad52ca
Add cmp methods to deque
2019-07-07 15:38:44 -05:00
Windel Bouwman
ff21c14c49
Merge pull request #1116 from RustPython/remove-cpython-bytecode-tests
...
Remove bytecode compilation.
2019-07-07 21:54:38 +02:00
Windel Bouwman
18bb56330e
Merge pull request #1115 from RustPython/fstring-fix
...
Improve f-string syntax. Fixes #1099
2019-07-07 19:42:21 +02:00
Windel Bouwman
310f89ec21
Remove bytecode compilation. Add feature to enable verbose logging in vm.
2019-07-07 15:23:43 +02:00
Windel Bouwman
7e138eca3b
Improve f-string syntax. Fixes #1099
2019-07-07 12:04:43 +02:00
Maxim Kurnikov
347d48198e
fix remaining clippy warnings
2019-07-07 06:27:07 +03:00
coolreader18
fbd0c599a9
Merge pull request #1074 from JimJeon/feature/rmod
...
Implement int.__rmod__
2019-06-30 20:33:15 -05:00
JimJeon
2f1d4a8d29
Fix with rustfmt
2019-07-01 09:44:47 +09:00
Windel Bouwman
f0492eefb2
Merge pull request #1084 from silmeth/int-float-comparison
...
fix float–int cross-type comparisons
2019-06-30 09:25:49 +02:00
Aviv Palivoda
4bf317c3af
Merge pull request #1076 from corona10/complex_repr
...
Fix complex representation for negative imaginary number case.
2019-06-29 21:03:16 +03:00
silmeth
d0de3be2a9
fix float–int cross-type comparisons
...
Fixes #1069
2019-06-29 16:50:09 +02:00
Windel Bouwman
0a242b69a5
Merge pull request #1067 from palaviv/memoryview-slice
...
Memoryview slice
2019-06-29 14:41:46 +02:00
JimJeon
5172a098bf
Changed function name to rmod
2019-06-29 17:38:01 +09:00
Dong-hee Na
b1aa10d03e
Fix complex representation for negative imaginary number case.
2019-06-29 16:30:34 +09:00
hannut91
91d901abdb
Add tuple.__rmul__
...
Add tuple.__rmul__ and uncomment test snippet of __rmul__.
2019-06-29 16:02:42 +09:00
JimJeon
1e568f1044
Implement int.__rmod__
...
Extracted inner_mod function and used in int.__mod__ and int.__rmod__
and also added test snippets of int.__mod__ and int.__rmod__.
2019-06-29 15:21:28 +09:00
Aviv Palivoda
7d2c4b6b6e
memoryview support __getitem__
2019-06-28 10:19:44 +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
coolreader18
9bb5dcc663
Merge pull request #1051 from michelhe/get-rid-of-debug-print
...
Remove a mistakenly commited debug print
2019-06-21 13:58:04 -05:00
Michel Heily
c972e7c73e
Remove a mistakenly commited debug print
2019-06-21 12:57:58 +03:00
coolreader18
aefbae40e4
Revert "Make CodeObject.source_path an Option<String>"
2019-06-20 12:01:20 -05: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
Michel Heily
f27265cf8a
Add get_value for objtuple
2019-06-17 19:35:09 +03:00
coolreader18
b74b65d37e
Make CodeObject.source_path an Option<String>
2019-06-16 19:59:04 -05:00
Aviv Palivoda
60e799727f
Support reversed on sequence
2019-06-14 15:25:24 +03:00
Windel Bouwman
3f343aff6c
Merge pull request #1018 from palaviv/imp3
...
Importlib
2019-06-12 16:21:26 +02: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
Aviv Palivoda
ea8e28026b
Simplify objmodule
2019-06-11 13:13:32 +03:00
Aviv Palivoda
c8248c3211
Expose __name__ in __dict__
2019-06-10 19:18:32 +03:00
Aviv Palivoda
375790e142
objmodule should have a dict
2019-06-10 19:18:32 +03:00
Aviv Palivoda
fe0284aa05
Add new to objmodule and change __name__ to property
2019-06-10 19:18:32 +03:00
Aviv Palivoda
698044b128
Add Module.__name__
2019-06-10 19:18:32 +03: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
Alan Justino
f0a2b4c50b
Apply the {!r} on str.format calls
...
By the Python docs, the `!` forces a conversion of the argument before
applying the normal formating logic described after the `:` marker.
See: https://docs.python.org/3.4/library/string.html#format-string-syntax
2019-06-09 18:11:10 -03:00
Antonio Yang
f76be43d26
str.isprintable
...
- check unicode type by unicode_categories
- rm redundant check of empty string
2019-06-09 23:33:38 +08:00
Maxim Kurnikov
8a5182a8a1
make get_method_or_type_error() error message lazy
2019-06-07 16:08:37 +03:00
Michel Heily
b2cdeab0c6
Fix memoryview.obj misimplementation.
...
The memoryview skeleton did not correctly assign the "obj" attribute;
The "obj" attribute was assigned to the memoryview class and not the memryview object,
leading to a funny bug that can be reproduced as follows:
```python
m1 = memoryview(b'1234')
m2 = memoryview(b'abcd')
print(m1.obj)
```
the result would be the value inside `m2` instead that of `m1`
2019-06-05 02:36:45 +03:00