Name: Anonymous 2008-08-23 2:12
SyntaxError: lambda cannot contain assignment
Is there a practical reason for this? now i have to do this:
self.fig_can.mpl_connect('button_press_event',self.on_mpl_click)
def on_mpl_click(self,event):
self.cur_axes = event.inaxes
instead of
self.fig_can.mpl_connect('button_press_event', lambda event:self.cur_axes = event.inaxes)
Think of the keystrokes that could be saved here, simply because Guido doesn't want to mix functional and imperative in lambdas???
Is there a practical reason for this? now i have to do this:
self.fig_can.mpl_connect('button_press_event',self.on_mpl_click)
def on_mpl_click(self,event):
self.cur_axes = event.inaxes
instead of
self.fig_can.mpl_connect('button_press_event', lambda event:self.cur_axes = event.inaxes)
Think of the keystrokes that could be saved here, simply because Guido doesn't want to mix functional and imperative in lambdas???