Browse Source
Commit e269cabe3e
added a check that the
first argument to the to_bytes() method is an integer, and now uPy
follows CPython behaviour and raises a TypeError for this test.
Note: CPython checks the argument types before checking the number of
arguments, but uPy does it the other way around, so they give different
exception messages for this test, but still the same type, a TypeError.
pull/3776/head
Damien George
7 years ago
1 changed files with 0 additions and 10 deletions
@ -1,10 +0,0 @@ |
|||
""" |
|||
categories: Types,int |
|||
description: Incorrect error message when passing float into to_bytes |
|||
cause: Unknown |
|||
workaround: Unknown |
|||
""" |
|||
try: |
|||
int('1').to_bytes(1.0) |
|||
except TypeError as e: |
|||
print(e) |
Loading…
Reference in new issue