Skip to content

int.from_bytes can omit byte_order parameter #4750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jyj0816 opened this issue Mar 25, 2023 · 2 comments · Fixed by #4748
Closed

int.from_bytes can omit byte_order parameter #4750

jyj0816 opened this issue Mar 25, 2023 · 2 comments · Fixed by #4748
Labels
z-ca-2023 Tag to track contrubution-academy 2023

Comments

@jyj0816
Copy link
Contributor

jyj0816 commented Mar 25, 2023

Feature

Changed in version 3.11: Added default argument value for byteorder.
Remove unnecessary parameter in "random.py"

a = int.from_bytes(a + _sha512(a).digest())

TypeError: Expected at least 1 arguments (2 given)

Python Documentation

documentation: CPython v3.11.2 from_bytes issue
source code: ref

@jyj0816 jyj0816 changed the title panicked when remove unnesscessary paramter in "random.py" TypeError when remove unnesscessary paramter in "random.py" Mar 25, 2023
@youknowone youknowone changed the title TypeError when remove unnesscessary paramter in "random.py" int.from_bytes can omit byte_order parameter Mar 25, 2023
@jyj0816
Copy link
Contributor Author

jyj0816 commented Mar 25, 2023

Fix byteorder parameter of int.from_bytes to optional

#[pyarg(positional, default = "ArgByteOrder::Big")]
    byteorder: ArgByteOrder,

source code: ref

@jyj0816
Copy link
Contributor Author

jyj0816 commented Mar 25, 2023

Fix byteorder parameter of int.from_bytes to any

#[pyarg(positional, default = "ArgByteOrder::Big")]
    byteorder: ArgByteOrder,

source code: ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
z-ca-2023 Tag to track contrubution-academy 2023
Projects
None yet
2 participants