Python Forum
How to test a function that is supposed to return NoneType?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to test a function that is supposed to return NoneType?
#2
As such, the function is not correct. Line 16 should be
player_info[1] = player_info[1] + word_score(word)
Giving a new value to the local variable by a statement such as player_info = ... cannot change anything out of the function.
Reply


Messages In This Thread
RE: How to test a function that is supposed to return NoneType? - by Gribouillis - Feb-17-2018, 07:38 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  nested function return MHGhonaim 2 668 Oct-02-2023, 09:21 AM
Last Post: deanhystad
  return next item each time a function is executed User3000 19 2,412 Aug-06-2023, 02:29 PM
Last Post: deanhystad
  function return boolean based on GPIO pin reading caslor 2 1,239 Feb-04-2023, 12:30 PM
Last Post: caslor
  how do I return Max Test result + corresponding student name from an excel dataset? sean1 3 1,313 Jan-16-2022, 09:07 PM
Last Post: snippsat
  return vs. print in nested function example Mark17 4 1,812 Jan-04-2022, 06:02 PM
Last Post: jefsummers
  Python class doesn't invoke setter during __init__, not sure if's not supposed to? mtldvl 2 3,394 Dec-30-2021, 04:01 PM
Last Post: mtldvl
  How to invoke a function with return statement in list comprehension? maiya 4 2,930 Jul-17-2021, 04:30 PM
Last Post: maiya
  How to test and import a model form computer to test accuracy using Sklearn library Anldra12 6 3,224 Jul-03-2021, 10:07 AM
Last Post: Anldra12
  Function - Return multiple values tester_V 10 4,606 Jun-02-2021, 05:34 AM
Last Post: tester_V
  Get return value from a threaded function Reverend_Jim 3 17,325 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