Ben Finney <[EMAIL PROTECTED]> wrote: > If you are passing a sequence conceptually, then it's more Pythonic to > pass it as a sequence explicitly:: > > def __init__(self, items): > """ Call with e.g. Stack(["foo", "bar"]) """ > self.stack = list(items)
I don't get this. You're forcing a copy to be made of the list. This changes the semantics of the original class, because the operations no longer change the original list. That may or may not be what you want. It's a design decision, not a "doing it this way is more pythonic" kind of thing. -- http://mail.python.org/mailman/listinfo/python-list