On 8/18/05, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 8/18/05, "Martin v. Löwis" <[EMAIL PROTECTED]> wrote: > > As for the more general proposal: -1 on more places to pass strings to > > denote method/function/class names. These are ugly to type. > > Agreed. > > > What I think you want is not a partial method, instead, you want to > > turn a method into a standard function, and in a 'virtual' way. > > > > So I would propose the syntax > > > > lst.sort(key=virtual.lower) # where virtual is functional.virtual > > I like this, but would hope for a different name -- the poor word > 'virtual' has been abused enough by C++. >
Yeah, me too. Possible name are 'delayed', 'lazyattr', or just plain 'lazy' since it reminds me of Haskell. > > P.S. It's not even clear that this should be added to functional, > > as attrgetter and itemgetter are already in operator. But, perhaps, > > they should be in functional. > > They feel related to attrgetter more than to partial. > True, but the idea of lazy evaluation, at least for me, reminds me more of functional languages and thus the functional module. Oh, when should we think of putting reduce into functional? I remember this was discussed when it was realized reduce was the only functional built-in that is not covered by itertools or listcomps. -Brett _______________________________________________ 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