Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic function name
#5
Ah, yeah. I meant that. But didn't work for me. It's actually like:

decorator = lambda x: some_decorator.some_method()
I expected it work. But it din't.

Also, tried:

some_decorator = lambda x: x.some_method()
Where, my actual function definition is like:

@some_decorator.some_method()
def dynamic():
  return 'somethin'
Reply


Messages In This Thread
Dynamic function name - by bhojendra - Jul-11-2019, 06:10 AM
RE: Dynamic function name - by scidam - Jul-11-2019, 07:07 AM
RE: Dynamic function name - by bhojendra - Jul-11-2019, 07:18 AM
RE: Dynamic function name - by scidam - Jul-11-2019, 07:50 AM
RE: Dynamic function name - by bhojendra - Jul-11-2019, 08:03 AM
RE: Dynamic function name - by scidam - Jul-12-2019, 12:17 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Run function in parallel but inherite dynamic data from the previous function atizva 4 3,638 Jul-11-2018, 06:39 AM
Last Post: volcano63

Forum Jump:

User Panel Messages

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