Skip to content

ord() difference between V1 and V2 #138

Closed
@microbit-carlos

Description

@microbit-carlos

Originally reported in bbcmicrobit/micropython#775 and related to bbcmicrobit/micropython#774, but makes more sense in the V2 repo.

print("code point: {}".format(hex(ord("°"))))

In V1 we get the same as running the code in CPython:

code point: 0xb0

In V2:

TypeError: ord() expected a character, but string of length 2 found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions