| Thread overview | ||||||
|---|---|---|---|---|---|---|
|
June 21, 2014 assocArray.get(key, default) exists? | ||||
|---|---|---|---|---|
| ||||
IS there such method get(key, default) for associative arrays, like in Python? | ||||
June 21, 2014 Re: assocArray.get(key, default) exists? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Paul Attachments:
| On Saturday, June 21, 2014, Paul via Digitalmars-d-learn < digitalmars-d-learn@puremagic.com> wrote: > IS there such method get(key, default) for associative arrays, like in Python? > I think it's named getDefault, try that. | |||
June 21, 2014 Re: assocArray.get(key, default) exists? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Paul | Paul:
> IS there such method get(key, default) for associative arrays, like in Python?
Try it.
Bye,
bearophile
| |||
June 21, 2014 Re: assocArray.get(key, default) exists? | ||||
|---|---|---|---|---|
| ||||
Posted in reply to bearophile | On Saturday, 21 June 2014 at 18:14:15 UTC, bearophile wrote:
> Paul:
>
>> IS there such method get(key, default) for associative arrays, like in Python?
>
> Try it.
>
> Bye,
> bearophile
Wow! Thank you! It exists. Excuse my silly question :)
| |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply