You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Why is there a concept "unbound method" in <Descriptor HowTo Guide> python3 version? #74478
bpo-23702: docs.python.org/3/howto/descriptor.html still refers to "unbound methods"
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2017-05-06.14:20:15.867>created_at=<Date2017-05-06.13:05:43.286>labels= ['type-feature', 'docs']
title='Why is there a concept "unbound method" in <Descriptor HowTo Guide> python3 version?'updated_at=<Date2017-05-06.14:20:15.867>user='https://bugs.python.org/debuggy'
When I read <Descriptor HowTo Guide> (python 3.6.1 version), I found there is a concept of 'unbound method' in some places. However, when I referred to <What’s New In Python 3.0>, it said the concept of “unbound methods” has been removed from the language.
So I wondered if there should be a change in <Descriptor HowTo Guide> python3 version?
For instance, in this code example of the guide:
>>> classD(object):
... deff(self, x):
... return x
...
>>> d = D()
>>> D.__dict__['f'] # Stored internally as a function
<function f at 0x00C45070>
>>> D.f # Get from a class becomes an unbound method
<unbound method D.f>
>>> d.f # Get from an instance becomes a bound method
<bound method D.f of <__main__.D object at 0x00B18C90>>
When I tested myself, the result of statement "D.f" should be <function> not <unbound method>.
Activity
debuggy commentedon May 6, 2017
When I read <Descriptor HowTo Guide> (python 3.6.1 version), I found there is a concept of 'unbound method' in some places. However, when I referred to <What’s New In Python 3.0>, it said the concept of “unbound methods” has been removed from the language.
So I wondered if there should be a change in <Descriptor HowTo Guide> python3 version?
For instance, in this code example of the guide:
When I tested myself, the result of statement "D.f" should be <function> not <unbound method>.