"Phillip J. Eby" <pje at telecommunity.com>: > Given all this, I think I'm okay with saying that adapting from a mutable > object to an immutable interface (e.g list->tuple) is an improper use of > adaptation. Expecting such an adaptation to somehow make the underlying list unchangeable by any means would be unreasonable, I think. I can't see any way of enforcing that other than by making a copy, which goes agains the spirit of adaptation. There still might be uses for it, though, without any unchangeability guarantee, such as passing it to something that requires a tuple and not just a sequence, but not wanting the overhead of making a copy. Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg at cosc.canterbury.ac.nz +--------------------------------------+
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4