From cd6c8f46072cf67f5cb893e5db056a04fc18c5db Mon Sep 17 00:00:00 2001 From: Mike Cohen Date: Fri, 22 Aug 2025 09:56:34 +1000 Subject: [PATCH] Make dict accessors less common names to avoid masking common keys --- protocols/protocol_associative.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/protocols/protocol_associative.go b/protocols/protocol_associative.go index cb43f2d..1832b20 100644 --- a/protocols/protocol_associative.go +++ b/protocols/protocol_associative.go @@ -12,12 +12,12 @@ import ( var ( exportedDictMethods = map[string]bool{ - "Items": true, - "Keys": true, - "Values": true, - "Len": true, - "ToMap": true, - "String": true, + "@Items": true, + "@Keys": true, + "@Values": true, + "@Len": true, + "@ToMap": true, + "@String": true, } ) @@ -81,7 +81,7 @@ func (self *AssociativeDispatcher) Associative( case *ordereddict.Dict: // Support common dict methods if exportedDictMethods[b_str] { - res, pres := DefaultAssociative{}.Associative(scope, a, b) + res, pres := DefaultAssociative{}.Associative(scope, a, b_str[1:]) return res, pres }