Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-99266: fix wrong exception message in ctypes docs#99267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
kamilturek wants to merge1 commit intopython:mainfromkamilturek:gh-99266

Conversation

kamilturek
Copy link
Contributor

@kamilturekkamilturek commentedNov 8, 2022
edited by bedevere-bot
Loading

This PR fixes the exception message inctypes docs.

Closes#99266.

>>>strchr=libc.strchr>>>strchr.restype=c_char_p>>>strchr.argtypes= [c_char_p,c_char]>>>>>>strchr(b"abcdef",b"def")Traceback (mostrecentcalllast):File"<stdin>",line1,in<module>ctypes.ArgumentError:argument2:TypeError:wrongtype

@@ -487,7 +487,7 @@ single character Python bytes object into a C char::
>>> strchr(b"abcdef", b"def")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ArgumentError: argument 2: TypeError:one character string expected
ArgumentError: argument 2: TypeError:wrong type
Copy link
ContributorAuthor

@kamilturekkamilturekNov 8, 2022
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Also, it should bectypes.ArgumentError instead ofArgumentError here and in a few other places. I can take care of it in a separate PR.

@kamilturekkamilturek marked this pull request as ready for reviewNovember 8, 2022 23:33
@kamilturekkamilturek deleted the gh-99266 branchNovember 9, 2022 22:07
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
awaiting reviewdocsDocumentation in the Doc dirskip news
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

ctypes: wrong exception message in docs
2 participants
@kamilturek@bedevere-bot

[8]ページ先頭

©2009-2025 Movatter.jp