long index(types::list<T> &seq, T const &x) { long index_value = seq.index(x); if (index_value == seq.size()) throw types::ValueError(__builtin__::anonymous::str(x) + " is not in list"); return index_value; }
long index(types::list<T> &seq, T const& x) { return seq.index(x); }