-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ispunct
differs from the function with the same name in C, could be worth a note
#56680
Comments
I don't see an issue with the inconsistency - the julia function is explicit in its documentation that it handles Unicode punctuation (consistent with the domain of |
I don't think there was any claim that this was an issue, just that explicitly pointing out the discrepancy might be a good idea. |
Well, Github calls this type of ticket an issue, so what else should I call it? 🤷
Yes, and I was agreeing with/reaffirming OP that the two functions aren't even intended to do the same thing. Why should we point out that a similar function in a different programming language has different behavior? Should we also clarify that From reading the two documentations, it should already be plainly clear that the two have different behavior. |
This came out a bit wrong - what I mean is that IMO there shouldn't be any expectation that the two functions behave the same, given the already existing differences in documentation between the two. So I'm partly questioning what such an additional text would add 😅 |
I think having the exact same name as the C function does make it nice to be clear to the user that they aren't the same specifically |
Just pointing out that this is technically because that's not minus, but dash (although we do canonicalize them for julia input).
|
I think it would make sense to comment on this explicitly in the Should be an easy PR if someone wants to take a stab. |
ispunct('+')
return falseispunct
differs from the function with the same name in C, could be worth a note
Not sure if this is a bug.
This seems intentional, but the
ispunct
in julia is inconsistent with the behavior of the C function of the same name, which is confusing.Perhaps a warning could be added to clarify the inconsistency with C.
https://en.cppreference.com/w/cpp/string/byte/ispunct
And more chars:
The text was updated successfully, but these errors were encountered: