On Tue, Nov 05, 2002 at 05:23:21PM +0800, James Henstridge wrote:
What I'd like to do is something like:
store = gtk.ListStore([gobject.TYPE_STRING]*cols)
Sure. Python makes it quite easy to call a function that takes a
variable number of arguments with an argument vector. You
Christian Reis wrote:
On Wed, Nov 06, 2002 at 12:49:48AM -0800, David M. Cook wrote:
On Tue, Nov 05, 2002 at 05:23:21PM +0800, James Henstridge wrote:
store = gtk.ListStore(*[str]*cols)
Whoa, slick, you can also use foo(**keys). I can get rid of all those
awkward apply()
I need to be able to determine at runtime how many columns a ListStore
should have. What I'd really like to do is something like passing a
list of types to the constructor instead of having to specify a set of
parameters to the constructor. Right now I have to do:
if cols == 1:
store =