Skip to content

JuliaCollections/PropertyDicts.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PropertyDicts.jl

Build Status Coverage

Wrap an AbstractDict to add getproperty support for Symbol and String keys.

julia> using PropertyDicts

julia> d = PropertyDict(Dict("foo"=>1, :bar=>2))
PropertyDict{Symbol, Int64, Dict{Symbol, Int64}} with 2 entries:
  :bar => 2
  :foo => 1

julia> d.foo, d.bar, d."foo"
(1, 2, 1)

julia> propertynames(d)
KeySet for a Dict{Symbol, Int64} with 2 entries. Keys:
  :bar
  :foo

julia> d.baz = 3
3

julia> d
PropertyDict{Symbol, Int64, Dict{Symbol, Int64}} with 3 entries:
  :baz => 3
  :bar => 2
  :foo => 1

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages