I agree in general, but just wanted to add that the pythonic approach would be to avoid the explicit index entirely, with something like:
alternate_word_mapping = dict(zip(words, words_in_english))
alternate_word_mapping = dict(zip(words, words_in_english))
That’s actually one reason why I don’t think it’s current incarnation is a good fit for learning new apis, it’s been trained on a lot of code, not all of it good.
Seems like something a future version might be able to fix, perhaps by training a new layer using just demonstrably ‘good’ code?
(V late reply as still learning how to keep track of replies on HN. But perhaps you’ll see it anyway.)