Python Forum
setting parameters for functions and nested functions
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
setting parameters for functions and nested functions
#2
Think of a function as a sort of black box. You give it some data to work with, it does *something*, and then gives you a return value. A function shouldn't use any value that isn't passed to it. global should be avoided at all costs.
Reply


Messages In This Thread
RE: setting parameters for functions and nested functions - by nilamo - Feb-24-2018, 06:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  using dir_fd=None in some functions Skaperen 2 267 Jun-14-2024, 07:22 PM
Last Post: Gribouillis
  two functions working in a strange way zapad 2 421 May-02-2024, 01:35 PM
Last Post: zapad
  Passing writable arguments to functions. Assembler 11 1,363 Jan-15-2024, 11:32 PM
Last Post: sgrey
  partial functions before knowing the values mikisDeWitte 4 794 Dec-24-2023, 10:00 AM
Last Post: perfringo
  Calling functions by making part of their name with variable crouzilles 4 1,022 Nov-02-2023, 12:25 PM
Last Post: noisefloor
  __name__ and __main__ in functions Mark17 3 945 Oct-12-2023, 01:55 AM
Last Post: deanhystad
  How can i combine these two functions so i only open the file once? cubangt 4 1,105 Aug-14-2023, 05:04 PM
Last Post: snippsat
  It seems you have to define functions at the top 357mag 7 1,536 May-10-2023, 03:01 PM
Last Post: jefsummers
  Merge two functions to one SamLiu 4 1,281 May-05-2023, 01:36 PM
Last Post: SamLiu
  Can I get some clarification on importing functions from external files. wh33t 3 1,032 Feb-25-2023, 08:07 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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