[issue34394] Descriptors HowTo doesn't mention __set_name__

2020-11-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

For the record, __set_name__ isn't specific to descriptors.  It can be used 
with any class:

>>> class A:
def __set_name__(*args):
print(args)
 
>>> class B:
x = A()
y = A()
 
(<__main__.A object at 0x7febfe01ac40>, , 'x')
(<__main__.A object at 0x7febfe01a5e0>, , 'y')

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34394] Descriptors HowTo doesn't mention __set_name__

2020-10-23 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.10, Python 3.9 -Python 3.4, Python 3.5, Python 3.6, Python 
3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34394] Descriptors HowTo doesn't mention __set_name__

2020-10-23 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

See https://github.com/python/cpython/pull/22906

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34394] Descriptors HowTo doesn't mention __set_name__

2020-09-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I have a draft PR but haven't checked it in yet.  Will do so shortly :-)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34394] Descriptors HowTo doesn't mention __set_name__

2020-09-15 Thread wim glenn


wim glenn  added the comment:

Hi Raymond, any update on this?

--
nosy: +wim.glenn

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34394] Descriptors HowTo doesn't mention __set_name__

2018-08-13 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Thanks. I'm already working on this.

--
assignee: docs@python -> rhettinger
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34394] Descriptors HowTo doesn't mention __set_name__

2018-08-13 Thread Semyon


New submission from Semyon :

There is a great HowTo document for descriptors 
https://github.com/python/cpython/blob/master/Doc/howto/descriptor.rst
But it doesn't even mention the __set_name__ method which was added in py3. And 
it lists the descriptor protocol without that method as if it is the full 
protocol. The only way to know about that method is to go to the link for any 
other method and then you'll see that there is a __set_name__.
I think the guide sholud be updated to include at least information about 
existence of __set_name__.

--
assignee: docs@python
components: Documentation
messages: 323479
nosy: MarSoft, docs@python
priority: normal
severity: normal
status: open
title: Descriptors HowTo doesn't mention __set_name__
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com