Aahz wrote: > What do we want to tell people who have code like this: > > keys = d.keys() > keys.sort()
I think the view returned in this case should be immutable, so that the above fails. Then we tell them to replace it with keys = sorted(d.keys()) In general, where we're changing the semantics of an existing method to return a view instead of a new object, the view returned should be immutable. -- Greg _______________________________________________ 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