Re: dictionary of operators

2008-02-15 Thread Robert Bossy
A.T.Hofkamp wrote: > On 2008-02-14, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> In the standard library module "operator", it would be nice to have a >> dictionary >> mapping operators strings with their respective functions. Something like: >> >> { >> '+': add, >> '-'

Re: dictionary of operators

2008-02-15 Thread A.T.Hofkamp
On 2008-02-14, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > In the standard library module "operator", it would be nice to have a > dictionary > mapping operators strings with their respective functions. Something like: > > { > '+': add, > '-': sub, > 'in': contains, >

dictionary of operators

2008-02-14 Thread rbossy
Hi, In the standard library module "operator", it would be nice to have a dictionary mapping operators strings with their respective functions. Something like: { '+': add, '-': sub, 'in': contains, 'and': and_, 'or': or_, ... } Rationale: Recently I had to implemen