From: <se...@so...> - 2005-09-01 12:22:35
|
Hello, I would like to ask you whether the following "feature" could be implemented in pyx. Currently, things like colour, style etc. are given to methods in a list (such as [color.rgb.blue] in c.fill(union, [color.rgb.blue]) taken from one of your examples) What do you think about allowing (e.g.) c.fill(union, color.rgb.blue)? (it is just that sometimes there are too many brackets, so it might be good to get rid of the frequent [,]). Naively it should require just replacing def fill(..., list_of_args=[]): ... with def fill(..., *list_of_args): if len(list_of_args) is 1 and isinstance(list_of_args[0],list): list_of_args=list_of_args[0] ... but I imagine in real life things are more complicated. Anyway, I'd be glad for your opinion. Best regards Paul |