Skip to content

0x and 0b case #102

@PhilipYip1988

Description

@PhilipYip1988

blue seems to be inconsistent to the Python interpreter for hex values. For example:

hex(2880744330)

returns:

0xabb4ab8a

Using blue on:

num1 = 0xabb4ab8a
num2 = 0xABB4AB8A
num3 = 0Xabb4ab8a 
num4 = 0XABB4AB8A

Gives:

num1 = 0xABB4AB8A
num2 = 0xABB4AB8A
num3 = 0xABB4AB8A 
num4 = 0xABB4AB8A

Python preferences lowercase hexadecimal because the upper case variations B and 8 look similar and A and 4 look similar increasing the chances of a transcription error:

blue_hex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions