On 5/4/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > I don't think that returning the type given is a goal > that should be attempted, because it can only ever work > for a fixed set of known types. Given an arbitrary > sequence type, there is no way of knowing how to > create a new instance of it with specified contents.
For objects that support the sequence protocol, how about specifying that: a, *b = container_object must be equivalent to: a, b = container_object[0], container_object[1:] That way, b is assigned whatever container_object's getslice method returns. A list will return a list, a tuple will return a tuple, and widgets (or BLists...) can return whatever makes sense for them. -- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises LLC _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com