On Thursday, June 10, 2021 at 6:47:37 PM UTC+2 axio...@yahoo.de wrote:
> The question is, whether we can rely on behaviour of the reference > implementation of python which contradicts its documentation: > > list.extend(*iterable*) > > Extend the list by appending all the items from the iterable. Equivalent > to a[len(a):] = iterable. > I believe it is equivalent: sage: def f(n): ....: return None ....: sage: l = []; l.extend(f(n) for n in range(3)); l [None, None, None] sage: l = []; l[len(l):] = (f(n) for n in range(3)); l [None, None, None] Sébastien -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/b180affe-6a10-4813-83d4-8a5cbf5527ban%40googlegroups.com.