Movatterモバイル変換


[0]ホーム

URL:


homepage

Message339249

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Authorserhiy.storchaka
Recipientsserhiy.storchaka
Date2019-03-31.07:17:26
SpamBayes Score-1.0
Marked as misclassifiedYes
Message-id<1554016646.98.0.667285997331.issue36492@roundup.psfhosted.org>
In-reply-to
Content
As Steve mentioned in the discussion aboutPEP 570 [1], some changes of parameters to positional-only are breaking (although there is no breaks in the stdlib code). Before making parameters positional-only we should add a deprecation warning for passing them as keyword arguments. Similarly to the code used in the UserDict constructor (seeissue22609).The following PR adds deprecation warnings for other parameters which should be positional-only. It also fixes bugs about nonavailability to pass special keyword names like "self" or "func". Just one example:>>> import functools>>> def f(self, func): pass... >>> functools.partialmethod(f, func=chr)Traceback (most recent call last):  File "<stdin>", line 1, in <module>TypeError: __init__() got multiple values for argument 'func'[1]https://discuss.python.org/t/pep-570-python-positional-only-parameters/1078/53
History
DateUserActionArgs
2019-03-31 07:17:27serhiy.storchakasetrecipients: +serhiy.storchaka
2019-03-31 07:17:26serhiy.storchakasetmessageid: <1554016646.98.0.667285997331.issue36492@roundup.psfhosted.org>
2019-03-31 07:17:26serhiy.storchakalinkissue36492 messages
2019-03-31 07:17:26serhiy.storchakacreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp