On Feb 3, 2006, at 6:47 AM, Giovanni Bajo wrote: ... > use itemgetter and friends but the "correct" way of doing a > defferred "x[1]" > *should* let you write "x[1]" in the code. This is my main > opposition to > partial/itemgetter/attrgetter/methodcaller: they allow deferred > execution > using a syntax which is not equivalent to that of immediate execution.
I understand your worry re the syntax issue. So what about Michael Hudson's "placeholder class" idea, where X[1] returns the callable that will do x[1] when called, etc? Looks elegant to me... Alex _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com