Python Forum
Python-Function object creation
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python-Function object creation
#1
As I understand from a book that function in Python is nothing but object of Function class. I have some doubts as below:

1.When this object gets created? At the time we define function or at the time we call a function?

2.If it is getting created at the time we define a function, then will it not be a waste of memory if we do not call that function anywhere in program ?

Looking for detail answer.
Reply


Messages In This Thread
Python-Function object creation - by studnik2 - Jul-28-2017, 05:50 AM
RE: Python-Function object creation - by Larz60+ - Jul-28-2017, 10:48 AM
RE: Python-Function object creation - by DeaD_EyE - Jul-28-2017, 08:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  cx_oracle Error - AttributeError: 'function' object has no attribute 'cursor' birajdarmm 1 2,444 Apr-15-2023, 05:17 PM
Last Post: deanhystad
  dynamic object creation using python gary 7 1,306 Oct-15-2022, 01:35 PM
Last Post: Larz60+
  python update binary object (override delivered Object properties) pierre38 4 1,800 May-19-2022, 07:52 AM
Last Post: pierre38
  AttributeError: 'function' object has no attribute 'metadata 3lnyn0 5 4,680 Mar-28-2022, 04:42 PM
Last Post: Larz60+
  Is there a library for recursive object creation using config objects johsmi96 0 1,865 May-03-2021, 08:09 PM
Last Post: johsmi96
  how to call an object in another function in Maya bstout 0 2,099 Apr-05-2021, 07:12 PM
Last Post: bstout
  subprogram issues: cannot unpack non-iterable function object error djwilson0495 13 6,042 Aug-20-2020, 05:53 PM
Last Post: deanhystad
  function/nonetype object is not iterable nanok66 5 4,072 May-08-2020, 07:39 PM
Last Post: nanok66
  Accessing method as function object ClassicalSoul 2 2,042 Feb-14-2020, 09:31 PM
Last Post: wavic
  How to mock an object that is created during function call? Schlangenversteher 0 1,987 Jan-31-2020, 01:36 PM
Last Post: Schlangenversteher

Forum Jump:

User Panel Messages

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