Skip to content
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

isascii was left behind in the Unicode move #25075

Closed
ararslan opened this issue Dec 14, 2017 · 8 comments · Fixed by #25076
Closed

isascii was left behind in the Unicode move #25075

ararslan opened this issue Dec 14, 2017 · 8 comments · Fixed by #25076
Assignees
Labels
stdlib Julia's standard library unicode Related to unicode characters and encodings

Comments

@ararslan
Copy link
Member

On 0.6:

julia> isascii
isascii (generic function with 2 methods)

On 0.7.0-DEV.2949:

julia> isascii
ERROR: UndefVarError: isascii not defined

julia> Base.isascii
ERROR: UndefVarError: isascii not defined

julia> Unicode.isascii
ERROR: UndefVarError: isascii not defined

julia> Base.Unicode.isascii
isascii (generic function with 2 methods)

Seems like it should be defined in the Unicode stdlib package and have a deprecation message.

@ararslan ararslan added stdlib Julia's standard library unicode Related to unicode characters and encodings labels Dec 14, 2017
@StefanKarpinski
Copy link
Member

Not exported from stdlib Unicode:

export normalize, graphemes, isassigned, textwidth, isvalid,
islower, isupper, isalpha, isdigit, isxdigit, isnumeric, isalnum,
iscntrl, ispunct, isspace, isprint, isgraph,
lowercase, uppercase, titlecase, lcfirst, ucfirst

@StefanKarpinski
Copy link
Member

I wonder if we shouldn't just leave isascii in Base? It's not like its meaning is going to change.

@nalimilan
Copy link
Member

Woops, looks like I stopped half-way... Yes, we could keep it in Base (actually I think I suggested that in the PR), since it's not really a Unicode function. Also it's special because it's the only predicate which accepts a string argument, and not only a Char.

@StefanKarpinski
Copy link
Member

Ok, let's just reinstate it to Base then.

@nalimilan
Copy link
Member

See #25076.

However, regarding a more general rule to decide which functions should live in Unicode, note that isdigit and isxdigit do not depend on changes in the Unicode standard either, so they could be kept in Base by that rule. Same for isvalid IIUC.

@StefanKarpinski
Copy link
Member

Those all seem reasonable to me. We may want to rename isxdigit to ishexdigit while we're at it, to avoid being quite as cryptic, although the name isxdigit is quite ubiquitous, unfortunately.

@IgorFomenko
Copy link

Hi, why I`ve got the same error with variable name beginning with \partial unicode?

@StefanKarpinski
Copy link
Member

Please post questions to the Julia discourse discussion forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Julia's standard library unicode Related to unicode characters and encodings
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants