Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

Explain or link to first use of :symbol #27

Open
mark-summerfield opened this issue Mar 6, 2017 · 0 comments
Open

Explain or link to first use of :symbol #27

mark-summerfield opened this issue Mar 6, 2017 · 0 comments

Comments

@mark-summerfield
Copy link

In http://docs.julialang.org/en/latest/manual/strings.html there is this example:
julia> m=match(r"(?\d+):(?\d+)","12:45")
RegexMatch("12:45", hour="12", minute="45")
julia> m[:minute]
"45"

I'm guessing that :minute is a symbol name (like in Ruby). But I think the example should show, first, what people would expect:
julia> m["minute"]
and then the symbol syntax (for non-Rubyists):
julia> m[:minute]
And explain the :symbol or at least give a link to where it is explained later on (which I presume it is---I'm just commenting as I read the manual for the first time).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant