On 23/08/2008, at 3:43 AM, Harald Schilly wrote:
> For me, python is a different playground than mma and unless there > isn't a real reason i don't like to import mma syntax - or any other. I would much prefer to learn the proper python way of doing things than try to retrofit python to make it look like mathematica. > this example is for me better done by > >>>> data = [-1,2,3] >>>> gt0 = lambda x: x>0 and x or 0 >>>> map(gt0, data) > [0, 2, 3] > > in python - or more geeky > >>>> map(lambda x: x>0 and x or 0, data) > [0, 2, 3] Can someone translate that "lambda x: x>0 and x or 0" into William's "the words in your head" please? D --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---