newb question about @property

Chris Angelico rosuav at gmail.com
Mon Oct 2 15:59:00 EDT 2017


On Tue, Oct 3, 2017 at 6:51 AM, Bill <BILL_NOSPAM at whoknows.net> wrote:
> Can you inspire me with a good decorator problem (standard homework
> exercise-level will be fine)?  Otherwise  I will go create one which will
> prints a row of asterisks before and after the call to the original function
> (which I think I should do). But maybe you have something more interesting?
> Or maybe you can refer me to a good source of Python problems, so I can bug
> you less?
>

Start with the row of asterisks. Then change your function to make the
"ending" line also say how long the function took to complete. That's
a handy tool (albeit a simplistic implementation of it).

You may find codewars.com useful, though I don't know how many
Python-specific puzzles they have. Or just search the web for
"programming puzzles" and see what you find.

ChrisA



More information about the Python-list mailing list