Adding new labelClass for layer

Discussion created by arekmatoszka on Jul 8, 2011
Is there any way to add new labelClass for layer in python?
layer.labelCasses ruturns python list of labelClasses, but how create new instance of labelCalss?
I tried to make a copy of existing class, make some changes (className, expresion etc.) and append to layer.labelClasses, but it doesn't work (instead of append it overwrites copied class).
Also tried to create new list of classes and replace oryginal list with:
layer.labelClasses = new_list
But as a resulst layer.labelClasses was empty list (new_list wasn't)
Any ideas?