[issue45104] Error in __new__ docs

2021-09-07 Thread Łukasz Langa

Łukasz Langa  added the comment:

Thanks for the patch, Raymond!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue45104] Error in __new__ docs

2021-09-07 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset b1f2fe777e1fe133d33cd1e714b8aa0f81fed1cc by Miss Islington (bot) 
in branch '3.9':
bpo-45104: Clarify when __init__ is called (GH-28210) (GH-28212)
https://github.com/python/cpython/commit/b1f2fe777e1fe133d33cd1e714b8aa0f81fed1cc


--

___
Python tracker 

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



[issue45104] Error in __new__ docs

2021-09-07 Thread miss-islington


miss-islington  added the comment:


New changeset ef704137770b2e98da7880c828aaf921f0b45337 by Miss Islington (bot) 
in branch '3.10':
bpo-45104: Clarify when __init__ is called (GH-28210)
https://github.com/python/cpython/commit/ef704137770b2e98da7880c828aaf921f0b45337


--

___
Python tracker 

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



[issue45104] Error in __new__ docs

2021-09-07 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset 5a42a49477cd601d67d81483f9589258dccb14b1 by Miss Islington (bot) 
in branch '3.8':
bpo-45104: Clarify when __init__ is called (GH-28210) (GH-28213)
https://github.com/python/cpython/commit/5a42a49477cd601d67d81483f9589258dccb14b1


--

___
Python tracker 

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



[issue45104] Error in __new__ docs

2021-09-07 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 6.0 -> 7.0
pull_requests: +26636
pull_request: https://github.com/python/cpython/pull/28211

___
Python tracker 

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



[issue45104] Error in __new__ docs

2021-09-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26637
pull_request: https://github.com/python/cpython/pull/28212

___
Python tracker 

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



[issue45104] Error in __new__ docs

2021-09-07 Thread miss-islington


Change by miss-islington :


--
pull_requests: +26638
pull_request: https://github.com/python/cpython/pull/28213

___
Python tracker 

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



[issue45104] Error in __new__ docs

2021-09-07 Thread Łukasz Langa

Łukasz Langa  added the comment:


New changeset fa15df77f02ba4a66ba0b71989381a426038be01 by Raymond Hettinger in 
branch 'main':
bpo-45104: Clarify when __init__ is called (GH-28210)
https://github.com/python/cpython/commit/fa15df77f02ba4a66ba0b71989381a426038be01


--
nosy: +lukasz.langa

___
Python tracker 

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



[issue45104] Error in __new__ docs

2021-09-07 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
keywords: +patch
pull_requests: +26635
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/28210

___
Python tracker 

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



[issue45104] Error in __new__ docs

2021-09-07 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I concur with Raymond. Originally it was "instance of cls". It was changed in 
issue15542 (6b16d938d6d1ccb443815e20e8812deed274dc09).

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue45104] Error in __new__ docs

2021-09-07 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I would be happy with just "instance of cls".  Elsewhere in the docs, that 
phrasing almost always means "instance of a cls or instance of a subclass of 
cls".  Also, it is consistent with the meaning of isinstance(inst, cls) unless 
overridden by ABC logic.

--
nosy: +rhettinger

___
Python tracker 

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



[issue45104] Error in __new__ docs

2021-09-06 Thread Vedran Čačić

Vedran Čačić  added the comment:

The first variant seems best to me.

--
nosy: +veky

___
Python tracker 

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



[issue45104] Error in __new__ docs

2021-09-04 Thread Kevin Shweh

New submission from Kevin Shweh :

The data model docs for __new__ say "If __new__() is invoked during object 
construction and it returns an instance or subclass of cls, then the new 
instance’s __init__() method will be invoked..."

"instance or subclass of cls" is incorrect - if for some reason __new__ returns 
a subclass of cls, __init__ will not be invoked, unless the subclass also 
happens to be an instance of cls (which can happen with metaclasses).

This should probably say something like "instance of cls (including subclass 
instances)", or "instance of cls or of a subclass of cls", or just "instance of 
cls".

--
assignee: docs@python
components: Documentation
messages: 401065
nosy: Kevin Shweh, docs@python
priority: normal
severity: normal
status: open
title: Error in __new__ docs
versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9

___
Python tracker 

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