Tag Archives: python

Python’s namedtuple… for .Net!

One of the things I have seen people applaud about Python is its “namedtuple” class. If you could describe this in terms of .Net’s Tuple (and <T1, T2, etc>) it would be to basically say that it’s the same as Tuple, but if instead of “Item1” on Tuple you got “Name” or “Age” or whatever… Read More »

C# equivalent of Python’s list slicing (list[:])

UPDATE: C# has introduced Range Expressions as of C# 8. Check them out instead! While porting some Python code, I wanted to make it as close of a match as possible so I came up with this extension method. Enjoy.