Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue32677

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

classification
Title:Add.isascii() to str, bytes and bytearray
Type:enhancementStage:resolved
Components:Interpreter CoreVersions:Python 3.7
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: methane, vstinner
Priority:normalKeywords:patch

Created on2018-01-26 11:09 bymethane, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 5342mergedmethane,2018-01-26 11:10
PR 5356mergedmethane,2018-01-27 05:38
Messages (4)
msg310754 -(view)Author: Inada Naoki (methane)*(Python committer)Date: 2018-01-26 11:09
int() and str.is*** functions accepts other than ASCII.But we want to accept only ASCII in some cases.  (e.g. ipaddress module)We can use try-except to check ASCII, but it's inefficient.try:    s.encode('ascii')except UnicodeEncodeError:    ascii = Falseelse:    ascii = TrueCPython can check string is ASCII efficiently.(Voting on python-ideas ML now)
msg310755 -(view)Author: STINNER Victor (vstinner)*(Python committer)Date: 2018-01-26 11:09
> (Voting on python-ideas ML now)https://mail.python.org/pipermail/python-ideas/2018-January/048737.html
msg310839 -(view)Author: Inada Naoki (methane)*(Python committer)Date: 2018-01-27 05:06
New changeseta49ac9902903a798fab4970ccf563c531199c3f8 by INADA Naoki in branch 'master':bpo-32677: Add .isascii() to str, bytes and bytearray (GH-5342)https://github.com/python/cpython/commit/a49ac9902903a798fab4970ccf563c531199c3f8
msg310902 -(view)Author: Inada Naoki (methane)*(Python committer)Date: 2018-01-28 00:59
New changesetbea57060c863d0c3474c79350bd9c557f2ff0e7c by INADA Naoki in branch 'master':bpo-32677: Optimize str.isascii() (GH-5356)https://github.com/python/cpython/commit/bea57060c863d0c3474c79350bd9c557f2ff0e7c
History
DateUserActionArgs
2022-04-11 14:58:57adminsetgithub: 76858
2018-01-28 01:01:04methanesetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2018-01-28 00:59:15methanesetmessages: +msg310902
2018-01-27 05:38:09methanesetpull_requests: +pull_request5202
2018-01-27 05:06:23methanesetmessages: +msg310839
2018-01-26 17:06:03methanesettitle: Add str.isascii() -> Add.isascii() to str, bytes and bytearray
2018-01-26 11:10:25methanesetkeywords: +patch
stage: patch review
pull_requests: +pull_request5188
2018-01-26 11:09:44vstinnersetnosy: +vstinner
messages: +msg310755
2018-01-26 11:09:08methanecreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp