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

Change behavior of eltype() #102

Merged
merged 1 commit into from
Nov 23, 2017
Merged

Change behavior of eltype() #102

merged 1 commit into from
Nov 23, 2017

Conversation

nalimilan
Copy link
Member

eltype(CategoricalString) should return Char for consistency with getindex. eltype(CategoricalValue) should not be defined, which means it returns Any (like any other type by default).

Cf. JuliaData/DataFrames.jl#1282.

Cc: @alyst

eltype(CategoricalString) should return Char for consistency with getindex.
eltype(CategoricalValue) should not be defined, which means it returns Any
(like any other type by default).
@alyst
Copy link
Contributor

alyst commented Nov 22, 2017

+1. The idea was that eltype() would be a synonym for leveltype(), but it's true that it would interfere with eltype() for container-like categorical values.
IIRC there are no other generic Base overrides for categorical values (except hash/isless/<, which make sense) that may conflict with the need to define Base methods for a specific categorical value.

@nalimilan nalimilan merged commit e07a9a4 into master Nov 23, 2017
@nalimilan nalimilan deleted the nl/eltype branch November 23, 2017 10:37
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

Successfully merging this pull request may close these issues.

2 participants