Commit Graph

130 Commits

Author SHA1 Message Date
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
Jeong YunWon
6c0f852b62 Refactor pymethod return types to be smaller as possible 2019-10-11 03:27:23 +09:00
Jeong YunWon
dc09fb7539 Defer BigInt::clone() for new_int 2019-10-11 00:40:31 +09:00
HyeockJinKim
37e85df527 Add __ne__ for float
Issue #1442
2019-10-10 03:49:13 +09:00
Jeong YunWon
2153ebbc23 Fix pow(0, exp) with negative exp to raise ZeroDivisionError 2019-10-05 00:04:31 +09:00
Noah
9ed825742c Revert " Fix argument keyword error in int/float/bool.__new__" 2019-10-02 21:33:43 -05:00
Sang-Heon Jeon
49577e0713 Merge branch 'master' into fix-int-arg 2019-10-02 15:19:01 +09:00
lntuition
a209169d9c Fix argument keyword error in float.__new__
Add FloatArgs struct to fix argument keyword error in float.__new
2019-10-02 15:13:45 +09: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
Daniel Alley
32b4a9255f Allow float() to be called without an argument
closes #1421
2019-09-26 22:54:47 -04:00
Noah
00a0e455f3 Merge pull request #1387 from RustPython/coolreader18/string-hash-field
Add a hash field to PyString á la CPython, make PyString.value private
2019-09-21 17:15:17 -05:00
MinJeong Kim
6e7e6ecfce Fix the ValueError for whitespace in float()
Ignore whitespace

Fixed: #1391
2019-09-20 18:21:15 +00:00
Noah
0def37d78e Make PyString.value private 2019-09-19 17:45:48 -05:00
tsvankay
5b2158ab18 fixed __repr__ return value for -0.0 2019-09-18 01:03:29 +09:00
Aviv Palivoda
a5026eded0 Use IntoPyFloat in complex 2019-09-14 12:55:22 +03:00
Aviv Palivoda
6a6a10afa1 Use IntoPyFloat in math.rs 2019-09-14 12:50:58 +03:00
coolreader18
825ee4bc7c Fix tests/clippy 2019-08-23 17:52:38 -05:00
coolreader18
b8eba6abe3 Add the array module 2019-08-23 17:34:52 -05:00
Windel Bouwman
32634b2d53 Merge pull request #1080 from JimJeon/feature/round
Feature/round
2019-08-15 19:50:52 +02:00
Windel Bouwman
589c431c8c Merge master branch 2019-08-15 18:59:29 +02:00
Marcin Pajkowski
e65e9ff7c3 Make func_ref an &PyObjectRef 2019-08-15 13:45:47 +02:00
JimJeon
befb9a239e Add round feature for objfloat when ndigits is 0 2019-08-15 16:16:40 +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
JimJeon
be887526c1 Fix implements of round
- Fix implements when ndigits argument of builtin_round is None
- Fix implements when ndigits argument of float_round is 0
2019-07-18 11:18:18 +09:00
coolreader18
2c65988ea7 Switch to hexf_parse 2019-07-11 18:53:47 -05:00
Maxim Kurnikov
347d48198e fix remaining clippy warnings 2019-07-07 06:27:07 +03:00
silmeth
d0de3be2a9 fix float–int cross-type comparisons
Fixes #1069
2019-06-29 16:50:09 +02:00
Maxim Kurnikov
8a5182a8a1 make get_method_or_type_error() error message lazy 2019-06-07 16:08:37 +03:00
Maxim Kurnikov
3bfd66bb89 make some exception messages more compatible with CPython, split get_method() into two methods and make raising TypeError more explicit for get_method() errors 2019-06-03 19:46:32 +03:00
Maxim Kurnikov
bc35a64e54 fix most of clippy warnings 2019-06-01 03:19:22 +03:00
coolreader18
9888d27e61 Merge pull request #981 from youknowone/frexp
Add math.frexp
2019-05-16 21:37:34 -05:00
Jeong YunWon
ca912a168d Add float.to_hex 2019-05-17 03:24:31 +09:00
Jeong YunWon
ceca2ed98e Add float.fromhex 2019-05-17 02:35:39 +09:00
Jeong YunWon
d223af645b Add math.frexp 2019-05-17 01:12:43 +09:00
Jeong YunWon
2c77dc208f Add float.__hash__ 2019-05-13 01:09:51 +09:00
Windel Bouwman
7ae533f860 Merge pull request #911 from sapir/fix-clippy-float-error
Fix clippy error about float comparison
2019-05-06 18:12:25 +02:00
Jeong YunWon
6b495eac1e str(1.0) == '1.0' 2019-05-06 02:14:28 +09:00
Y. Sapir
1a5bddc41b Fix clippy error about float comparison 2019-05-04 23:32:49 +03:00
Jeong YunWon
9a7fadcb6c Refactor PyComplex using try_complex 2019-05-04 00:59:19 +09:00
Windel Bouwman
e578dcfc46 Merge pull request #899 from youknowone/float-complex
Add numbers.Complex impl to float + extend_class
2019-05-03 17:22:12 +02:00
coolreader18
fa148a4aed Merge branch 'master' into float-round 2019-05-01 20:06:52 -05:00
Jeong YunWon
4a598d03e2 Add float.imag, float.conjugate 2019-05-01 21:31:02 +09:00
Jeong YunWon
bb878a3402 PyFloat to use extend_class for __new__ and __doc__ 2019-05-01 21:31:02 +09:00
Jeong YunWon
1c814ff2b5 Add float.__rpow__ 2019-05-01 04:02:34 +09:00
Jeong YunWon
09710b5222 Add float.__rdivmod__ and div/mod tests 2019-05-01 03:40:28 +09:00
Jeong YunWon
813307f8f9 Refactor PyFloat using try_float() 2019-05-01 01:22:56 +09:00
Jeong YunWon
a0ad4368c6 Add float.pow OverflowError handling 2019-05-01 01:22:52 +09:00
Jeong YunWon
a318e4e09e objfloat.rs try_float for common operand handling 2019-05-01 01:21:14 +09:00
Jeong YunWon
c951cb3cfd float.__round__ for ndigits == 0 2019-04-30 06:09:48 +09:00