You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IAM policy should return an empty set of the bindings do not exist #3346
@jonparrott ISTM like you want a collections.defaultdict(set)?
In #3325 a similar snippet was failing because policy.owners returned a frozenset. In the __getitem__ case, the raw binding will be returned, which we guarantee is a set. Is it a bad thing that the two different means of access produce different behavior?
Activity
dhermes commentedon May 1, 2017
Current behavior leads to
KeyError, yes?theacodes commentedon May 1, 2017
ya, I'd like to be able to do:
and it'll work regardless of if any editors had been previously set.
dhermes commentedon May 1, 2017
@jonparrott ISTM like you want a
collections.defaultdict(set)?In #3325 a similar snippet was failing because
policy.ownersreturned afrozenset. In the__getitem__case, the raw binding will be returned, which we guarantee is aset. Is it a bad thing that the two different means of access produce different behavior?theacodes commentedon May 1, 2017
Defaultdict is pretty much what I'm after, in terms of behavior.
I'm fine with the old/deprecated methods returning a frozenset.
iam.Policy: return empty set on missing key.