Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bound method
#1
Hi, i'm new to python and i have a quesition about method:

When i try this:

class Test:
    def test1():
        pass
a=Test()
print(Test.test1)
print(a.test1)
It printed out:
<function Test.test1 at 0x7fba4f2646a8>
<bound method Test.test1 of <__main__.Test object at 0x7fba510ee8d0>>
What is the differences between function and bound method ?
Reply
#2
Uchikago Wrote:What is the differences between function and bound method
Conceptually, a bound method is a pair consisting of a class instance and a function. It is wrapped as a callable python object.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Program running on RPi 3b+ Very Strange Behavior - Out of Bound Index MadMacks 26 3,280 Mar-07-2023, 09:50 PM
Last Post: MadMacks
  Upper-Bound Exclusive Meaning Johnny1998 1 3,348 Aug-02-2019, 08:32 PM
Last Post: ichabod801
  Branch and Bound jarrod0987 7 5,132 Jul-26-2018, 06:56 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

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