News for hackers. Stuff that matters.
Re:The state of type hints in Python by throwaway37585 on Wednesday June 20, 2018 @10:05PM (#17361498)
Why should it implicitly convert a number to a string? That's a common source of bugs. Explicit is definitely better.

Why not just do the following?

    foo = [1,2,3]
    bar = {'1': 1, '2': 2, '3': 3}
    for i in foo:
        print(bar[str(i)])

There are no comments on this comment yet.