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


Messages In This Thread
Bound method - by Uchikago - Jul-26-2019, 03:57 PM
RE: Bound method - by Gribouillis - Jul-26-2019, 04:43 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Program running on RPi 3b+ Very Strange Behavior - Out of Bound Index MadMacks 26 3,373 Mar-07-2023, 09:50 PM
Last Post: MadMacks
  Upper-Bound Exclusive Meaning Johnny1998 1 3,376 Aug-02-2019, 08:32 PM
Last Post: ichabod801
  Branch and Bound jarrod0987 7 5,184 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