Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
exec in a function
#3
(Apr-18-2021, 07:48 PM)Yoriz Wrote: You should include the error in your post
you're right, I'll do next time

I'm trying to understand why outside the function exec works (with New0) but not inside (with New that has no relation with New0); I'm missing things but I've not understood what so far
Reply


Messages In This Thread
exec in a function - by paul18fr - Apr-18-2021, 07:33 PM
RE: exec in a function - by Yoriz - Apr-18-2021, 07:48 PM
RE: exec in a function - by paul18fr - Apr-18-2021, 07:59 PM
RE: exec in a function - by Yoriz - Apr-18-2021, 08:14 PM
RE: exec in a function - by paul18fr - Apr-19-2021, 07:11 AM
RE: exec in a function - by ndc85430 - Apr-19-2021, 07:59 AM
RE: exec in a function - by paul18fr - Apr-19-2021, 11:10 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to avoid exec(), globals(), locals(), eval() paul18fr 10 5,261 Apr-21-2021, 05:53 PM
Last Post: snippsat
  exec + subprocess = UnboundLocalError paul18fr 6 3,670 Feb-04-2021, 06:27 AM
Last Post: Gribouillis
  exec() in class, NameError niski1996 6 4,153 Apr-20-2020, 07:14 PM
Last Post: niski1996
  Is this use of exec pythonic? psolar 1 1,901 Feb-07-2020, 12:23 PM
Last Post: buran
  problem using exec to save local variables dkarl 0 1,844 Dec-01-2019, 08:52 AM
Last Post: dkarl
  common code, def a function vs exec() a string Skaperen 7 3,516 May-27-2019, 10:13 AM
Last Post: heiner55
  using function through exec() kiyoshi7 9 5,808 Mar-03-2018, 09:25 PM
Last Post: Larz60+
  namespaces in comprehension in exec() Skaperen 4 4,835 Mar-28-2017, 03:31 AM
Last Post: Skaperen

Forum Jump:

User Panel Messages

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