[Python-Dev] Let's just keep lambda (original) (raw)
Crutcher Dunnavant crutcher at gmail.com
Sun Feb 5 23:26:54 CET 2006
- Previous message: [Python-Dev] Let's just *keep* lambda
- Next message: [Python-Dev] Let's just *keep* lambda
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Which reminds me, we need to support roman numeral constants. A silly implementation follows.
class RomanNumeralDict(dict): def getitem(self, key): if not self.has_key(key) and self.isRN(key): return self.decodeRN(key) return dict.getitem(self, key)
def isRN(self, key): for c in key: if c not in 'MmCcXxIiDdVv': return False return True
def decodeRN(self, key): val = 0 # ... do stuff ... return val
On 2/5/06, Tim Peters <tim.peters at gmail.com> wrote:
[Guido] > After so many attempts to come up with an alternative for lambda, > perhaps we should admit defeat. I've not had the time to follow the > most recent rounds, but I propose that we keep lambda, so as to stop > wasting everybody's talent and time on an impossible quest.
Huh! Was someone bad-mouthing lambda again? We should keep it, but rename it to honor a different Greek letter. xi is a good one, easier to type, and would lay solid groundwork for future flamewars between xi enthusiasts and Roman numeral fans :-)
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/crutcher%40gmail.com
-- Crutcher Dunnavant <crutcher at gmail.com> monket.samedi-studios.com
- Previous message: [Python-Dev] Let's just *keep* lambda
- Next message: [Python-Dev] Let's just *keep* lambda
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]