Can't get anchor names

The anchors object is a dictionary and its keys are the anchor names, right?
So I should be able to use the keys() method to get the anchor names, like this:

selectedLayers = [ x for x in Glyphs.currentDocument.selectedLayers() ]
for thisLayer in selectedLayers:
print thisLayer.anchors.keys()

But when I run this, I get this error:
AttributeError: ‘LayerAnchorsProxy’ object has no attribute ‘keys’

How do I access all anchor names?

I added the keys() method to the python wrapper. So in the next version your code will work.

For now either query the anchor objects for its names:
AnchorNames = [ for x in thisLayer.anchors ]

or use the ObjectivC method:
AnchorNames = thisLayer._owner.pyobjc_instanceMethods.anchors().allKeys()

OK, thanks!
(Now that I read this, I vaguely remember that you told me the query trick before… it’s been a while though)

… not quite, by the way, this is how I got the code working:

for thisLayer in selectedLayers:
. anchorlist = thisLayer.anchors
. print [ anchorlist[x].name for x in range( len(anchorlist) ) ]