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

istext("I am text") returns false - rename to istextmime #12872

Closed
catawbasam opened this issue Aug 30, 2015 · 6 comments
Closed

istext("I am text") returns false - rename to istextmime #12872

catawbasam opened this issue Aug 30, 2015 · 6 comments
Milestone

Comments

@catawbasam
Copy link
Contributor

In multimedia.jl, istext() is intended to assess MIME types. But since the istext() is exported, it can be taken out of context and generate counter-intuitive results. Maybe a more descriptive name would be warranted?

From multimedia.jl --

# it is convenient to accept strings instead of ::MIME
istext(m::AbstractString) = istext(MIME(m))
@stevengj
Copy link
Member

Probably istextmime would be better.

@ccsv
Copy link

ccsv commented Aug 30, 2015

@stevengj Agreed users can easily confuse MIME types with strings

@nalimilan
Copy link
Member

Or just remove the convenience version accepting strings. MIME"some/type" isn't that long.

@stevengj
Copy link
Member

@nalimilan, that would work, but you would need to add a method istext{T}(::Type{MIME{T}})

@ScottPJones
Copy link
Contributor

istext seems like it would be used to distinguish between binary and text string types.
ismimetext instead of istextmime I think might be a bit better.

@JeffBezanson
Copy link
Sponsor Member

+1 for renaming to something involving mime.

@JeffBezanson JeffBezanson changed the title istext("I am text") returns false istext("I am text") returns false - rename to istextmime Sep 15, 2015
@JeffBezanson JeffBezanson added this to the 0.5.0 milestone Sep 15, 2015
JeffBezanson added a commit that referenced this issue Apr 8, 2016
fix #12872, rename `istext` to `istextmime`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants