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
#8
that aspect of locals() is why i haven't used it to modify them in any serious way. i have tried to modify them and it does seem to work. but there could be cases where it doesn't work, ranging from the old value remains to a segfault of the engine or undetected data corruption, and numerous cases in between such how you explained it. compiled code could be caching recently accessed or correctly modified values. since it seems to allow read/fetch access from the dictionary, that suggests to me that the compiled code is expected to store these values.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
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 Skaperen - Jul-27-2020, 08:45 PM

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,378 Jun-18-2019, 06:09 PM
Last Post: Skaperen
  Windows Context Menu Depth GWild 0 2,340 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