Python Forum
function to store in caller's context
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
function to store in caller's context
#4
What is the advantage of doing something as unpythonic as updating locals() with 30 variables over the pythonic use of an instance which fields are these variables? For me, the only apparent benefit is that you can write omelette instead of b.omelette. There are probably several drawbacks that we have not yet discovered. So, why do you absolutely want do it this way? Is it your aesthetic sense?
Reply


Messages In This Thread
function to store in caller's context - by Skaperen - Jul-24-2020, 09:52 PM
RE: function to store in caller's context - by Gribouillis - Jul-26-2020, 05:32 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  exception context Skaperen 0 2,345 Mar-06-2021, 08:42 PM
Last Post: Skaperen
  in a function checking for caller errors Skaperen 3 2,314 Mar-04-2021, 05:00 AM
Last Post: Skaperen
  turning my function into a context manager Skaperen 2 1,996 Nov-14-2019, 09:08 PM
Last Post: Skaperen
  i want to make my own context manager Skaperen 0 1,686 Nov-10-2019, 05:21 AM
Last Post: Skaperen
  f-string for caller? Skaperen 2 2,018 Sep-16-2019, 07:47 PM
Last Post: Skaperen
  same context functions Skaperen 12 5,380 Jun-18-2019, 06:09 PM
Last Post: Skaperen
  Windows Context Menu Depth GWild 0 2,341 Jan-27-2018, 07:18 AM
Last Post: GWild

Forum Jump:

User Panel Messages

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