Quickpost: PEP 515 – Underscores in Numeric Literals

While attending a great presentation of Kaitai Struct at Hack.lu 2025, I noticed a binary numeric notation during the demo, that I had never seen before. Something like 0b1000_0001.

Introduction to Malware Binary Triage (IMBT) Course

Looking to level up your skills? Get 10% off using coupon code: MWNEWS10 for any flavor.

Enroll Now and Save 10%: Coupon Code MWNEWS10

Note: Affiliate link – your enrollment helps support this platform at no extra cost to you.

I’m familiar with notations in Python like 0b10000001, but not with an underscore thrown in to make the number more readable.

Turns out this exists for almost 10 years in Python (since Python 3.6), and that it is known as PEP 515 – Underscores in Numeric Literals.

And it exists in other programming languages too.

Quickpost info

Article Link: https://blog.didierstevens.com/2025/10/25/quickpost-pep-515-underscores-in-numeric-literals/

1 post - 1 participant

Read full topic



Malware Analysis, News and Indicators - Latest topics
Next Post Previous Post
No Comment
Add Comment
comment url