[Tutor] how to unittest cli input
Alex Kleider
akleider at sonic.net
Tue Oct 13 23:44:51 CEST 2015
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
More information about the Tutor
mailing list