Top "Tuples" questions

In programming, tuples are simple *product types*, representing ordered collections of types.

Ignore part of a python tuple

If I have a tuple such as (1,2,3,4) and I want to assign 1 and 3 to variables a and b I could …

python tuples iterable-unpacking
Generic hash for tuples in unordered_map / unordered_set

Why doesn't std::unordered_map<tuple<int, int>, string> just work out of the box? It …

c++ c++11 tuples unordered-map unordered-set
How does Python's comma operator works during assignment?

I was reading the assignment statements in the Python docs ( http://docs.python.org/reference/simple_stmts.html#assignment-statements ). In …

python tuples variable-assignment comma
Should I make a DateRange object?

A few of my domain objects contain date ranges as a pair of start and end date properties: public class …

.net model tuples date-range
Why is Scala's syntax for tuples so unusual?

In mathematics and computer science, a tuple is an ordered list of elements. In set theory, an (ordered) n-tuple is …

scala tuples iterable-unpacking
Returning two values, Tuple vs 'out' vs 'struct'

Consider a function which returns two values. We can write: // Using out: string MyFunction(string input, out int count) // Using …

c# struct tuples out value-type
What requirement was the tuple designed to solve?

I'm looking at the new C# feature of tuples. I'm curious, what problem was the tuple designed to solve? What …

c# tuples
Why is tuple faster than list in Python?

I've just read in "Dive into Python" that "tuples are faster than lists". Tuple is immutable, and list is mutable, …

python performance list tuples
Pretty-print std::tuple

This is a follow-up to my previous question on pretty-printing STL containers, for which we managed to develop a very …

c++ c++11 tuples variadic-templates
C2977: 'std::tuple' : too many template arguments (MSVC11)

I'm trying to build googletest with Visual C++ 11, but following code causes an error template <typename T1, typename T2, …

c++ visual-studio-2012 c++11 tuples variadic-templates