Open juancarlospaco opened 4 years ago
I don't see how this can be done. Python named tuples are actually named classes. Nim named tuples only have names for their members. What name should we use as a class name for python tuple?
So looks like it takes _
as name, in a weird "anonymous named" tuple.
import collections
collections.namedtuple("_", "key0 key1")("foo", 42)
Source: https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers#named-tuple
Thanks for all the work done, it is really an awesome project!. 🙂:+1:
Ok, that could work :)
Any news on this?, this feature would be awesome. 🙂
Nim
Tuple
with names :arrow_right: Pythoncollections.NamedTuple
:Should produce on Python:
Current output is: