Python Forum
what is this doc page for
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what is this doc page for
#6
(May-15-2017, 03:15 AM)Skaperen Wrote: what can these be used for?
They are syntax for wrapping a function definition at definition time. They're not for changing built-in / third party functions at runtime. They're logically equivalent to other forms of wrapping. The best example I've seen is caching / memoization, and it doesn't necessary make the code shorter, though it helps with separation of concerns and if the decorator is reusable then you can have less code.
Reply


Messages In This Thread
what is this doc page for - by Skaperen - May-14-2017, 05:49 AM
RE: what is this doc page for - by Larz60+ - May-14-2017, 12:23 PM
RE: what is this doc page for - by Ofnuts - May-14-2017, 03:11 PM
RE: what is this doc page for - by Skaperen - May-15-2017, 03:15 AM
RE: what is this doc page for - by Larz60+ - May-15-2017, 05:03 AM
RE: what is this doc page for - by micseydel - May-15-2017, 05:02 PM
RE: what is this doc page for - by nilamo - May-15-2017, 05:49 PM
RE: what is this doc page for - by micseydel - May-15-2017, 05:56 PM
RE: what is this doc page for - by snippsat - May-15-2017, 06:15 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020