Python Forum
Learning python SyntaxError: 'return' outside function
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Learning python SyntaxError: 'return' outside function
#4
Also, when debug error - always post the full traceback (in error tags) alongside the actual code that produce it (in python tags).
(Aug-03-2020, 02:49 AM)Grale1953 Wrote: This code does what it should.
This code (as is now) will produce error
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
RE: Learning python SyntaxError: 'return' outside function - by buran - Aug-03-2020, 06:55 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  nested function return MHGhonaim 2 621 Oct-02-2023, 09:21 AM
Last Post: deanhystad
  return next item each time a function is executed User3000 19 2,311 Aug-06-2023, 02:29 PM
Last Post: deanhystad
Sad I'm stuck with the reinforcement learning function in my Code OskiLori 2 1,582 May-20-2023, 10:01 PM
Last Post: OskiLori
  function return boolean based on GPIO pin reading caslor 2 1,193 Feb-04-2023, 12:30 PM
Last Post: caslor
  return vs. print in nested function example Mark17 4 1,757 Jan-04-2022, 06:02 PM
Last Post: jefsummers
  How to invoke a function with return statement in list comprehension? maiya 4 2,865 Jul-17-2021, 04:30 PM
Last Post: maiya
Sad SyntaxError: from simple python example file from mind-monitor code (muse 2) warmcupoftea 4 2,854 Jul-16-2021, 02:51 PM
Last Post: warmcupoftea
  Function - Return multiple values tester_V 10 4,468 Jun-02-2021, 05:34 AM
Last Post: tester_V
  Question on None function in a machine learning algorithm Livingstone1337 1 2,363 Mar-17-2021, 10:12 PM
Last Post: supuflounder
  Get return value from a threaded function Reverend_Jim 3 17,153 Mar-12-2021, 03:44 AM
Last Post: Reverend_Jim

Forum Jump:

User Panel Messages

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