Elektrine lite

← Feed

@SnoopJ@hachyderm.io

Post #3472003

2026-06-29 15:29 UTC

@kojoidrissa@fosstodon.org @yossarian@infosec.exchange it's always felt 'off' to me that 一二三… are numeric but not valid for `int()`. I know why on a technical basis, but it makes me uncomfortable.

Replies (1)

  • @yossarian@infosec.exchange 2026-06-29 15:36

    @SnoopJ@hachyderm.io @kojoidrissa@fosstodon.org I think the inconsistency is surprising, but IMO `int()` should actually do neither this nor other non-western-arabic numbering schemes! it's IMO a good example of two (eminently) reasonable concerns being mixed rather than properly isolated -- `int()` should turn non-formatted western arabic digits into numbers, and there should probably be an `int.parse()` or similar API that can handle different numeral systems, i18n, infixes, etc.

    Open ##3472000