On Tue, Oct 13, 2015 at 2:44 PM, Alex Kleider <aklei...@sonic.net> wrote: > On 2015-10-13 12:11, Danny Yoo wrote: > > >> ###################### >> def make_ask(f, l, p): >> d = {'Enter your first name: ' : f, >> 'Enter your last name: ' : l, >> 'Your mobile phone #: ' : p} >> return d.get >> ###################### > > > This last line got my attention ("a dict has no such attribute" > but rather "it has a 'get' method") > but then the light went on: you've created a function that > returns a function. So many levels of abstraction!
Yes. Functions are cool. To use of functions as first-class values is a lot of fun, and you'll get the hang of it once you see the trick a few times. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor