message: Let TypeConversion function handle checking input object type
  * This means e.g. when we're converting a `bytes` we don't bail when it
  isn't a list.
diff: @@ -79,22 +79,24 @@ SIMPLE_TYPEMAPS_VARIANT(SimpleType, SimpleType &)
  %typemap(in, fragment="pyconvert") ContainerType (unsigned char tempmem[32]) {
  static_assert(sizeof(tempmem) >= sizeof(std::remove_pointer<decltype($1)>::type), "not enough temp space for $1_basetype");
  - if(!PyList_Check($input))
  - {
  - SWIG_exception_fail(SWIG_TypeError, "in method '$symname' list expected for argument $argnum of type '$1_basetype'");
  - }
  -
  tempalloc($1, tempmem);
  int failIdx = 0;
  int res = TypeConversion<std::remove_pointer<decltype($1)>::type>::ConvertFromPy($input, indirect($1), &failIdx);
  if(!SWIG_IsOK(res))
  + {
  + if(res == SWIG_TypeError)
  + {
  + SWIG_exception_fail(SWIG_ArgError(res), "in method '$symname' argument $argnum of type '$1_basetype'");
  + }
  + else
  {
  snprintf(convert_error, sizeof(convert_error)-1, "in method '$symname' argument $argnum of type '$1_basetype', decoding element %d", failIdx);
  SWIG_exception_fail(SWIG_ArgError(res), convert_error);
  }
  }
  +}
  %typemap(freearg, fragment="pyconvert") ContainerType {
  tempdealloc($1);
  