Paths.append() broken?

myPaths = Layer.paths # also with `.__copy__()`
print myPaths

fails: :point_down:

  File "GlyphsApp/GlyphsApp/", line 2181, in append

Builds 1137 and 1139

Any ideas?

You cannot append a list of paths. What you want is called .extend(). Type help(list). and you will amongst other things see this:

 |  extend(...)
 |      L.extend(iterable) -- extend list by appending elements from the iterable

And you probably want to make a .copy() of the paths before. You may end up iterating through your paths and do something like Layer.paths.append(myPath.copy())

1 Like

The append method was wrong before. I fixed it and added the .extend() method.

1 Like

true. But as Georg now wrote, it worked before :smiley:
I dind’t make the copy here for the example. In real life I’m not even appending this layer’s paths :slight_smile:

@mekkablue @GeorgSeifert Thanks for the quick feedback, I’ll change it now.