Movatterモバイル変換


[0]ホーム

URL:


homepage

Message303340

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

AuthorOren Milman
RecipientsOren Milman, rhettinger, serhiy.storchaka, xiang.zhang
Date2017-09-29.16:52:28
SpamBayes Score-1.0
Marked as misclassifiedYes
Message-id<1506703948.7.0.213398074469.issue28280@psf.upfronthosting.co.za>
In-reply-to
Content
I would be happy to write a PR that implements that.However, i am not sure which way is better to construct a list from the returnvalue (an iterable, hopefully) of keys() etc.:- Call PyList_Type() (in each of PyMapping_Keys() etc.) on the iterable, and  overwrite the error message in case it is a TypeError.- Write a helper function iterable_as_list(), which uses PyObject_GetIter() and  PySequence_List(), and call it in each of PyMapping_Keys() etc..  (iterable_as_list() would receive "keys" etc., so that it would raise the  appropriate error message, in case of a TypeError.)ISTM that the first one is simpler, but I am not sure about the performancedifference between them.
History
DateUserActionArgs
2017-09-29 16:52:28Oren Milmansetrecipients: +Oren Milman,rhettinger,serhiy.storchaka,xiang.zhang
2017-09-29 16:52:28Oren Milmansetmessageid: <1506703948.7.0.213398074469.issue28280@psf.upfronthosting.co.za>
2017-09-29 16:52:28Oren Milmanlinkissue28280 messages
2017-09-29 16:52:28Oren Milmancreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp