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!

Thanks for making things fall into place.
cheers,
Alex
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to