As I wrote originally, as a user I don't see a problem ONLY if
appropriate exception message will be shown. If I'll be told that
tuples are not allowed and I need to convert it to list it's fine with
me as a user. Otherwise it's unclear if I got error or tuple object is
not supported. Here is exception message:
InvalidDocument: Cannot encode object: (1, 1)
so from user point of view it seems like driver problem, rather
unsupported object type.
On Aug 26, 5:46 pm, Michael Dirolf <
m...@10gen.com> wrote:
> Any other thoughts on this? I'm pretty flexible on this - could be
> strict and say lists only, or could allow any iterable (which would be
> converted to a list on a database roundtrip). As Nicolas points out -
> allowing just lists and tuples probably doesn't make as much sense as
> either of the other options.
>
> Wondering what the community thinks?
>
> On Aug 26, 2009, at 4:51 PM, Nicolas Clairon wrote:
>
>
>
> > If tuple are converted to lists, then it make sense that every object
> > wich implement __iter__ method can be insert into database.
>
> > From my point of view, I prefere to be explicite than implicite as
> > converting tuple to list is not so difficulte :
>
> > my_list = list(my_tuple)
>