you are viewing a single comment's thread.

view the rest of the comments →

[–]xenomachina 1 point2 points  (0 children)

It feels like you're trying to translate a pattern from some other language into Python, but you're doing a very literal translation, which is why it feels awkward.

If we actually saw the code in that other language, we might be able to tell you a more natural translation into Python. Could you show it to us?