fre 2003-03-21 klockan 12.41 skrev Greg Ward: > I was just playing around with GtkListStore, and I think I've found a > simple-but-subtle bug in pygtk: an exception condition is not being > correctly returned to Python. Illustration: > > $ python > Python 2.2.2 (#1, Jan 18 2003, 10:18:59) > [GCC 3.2.2 20030109 (Debian prerelease)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import gtk > >>> gtk.ListStore() <<< should raise TypeError, I guess > <gtk.ListStore object (uninitialized) at 0x8160f0c> > >>> adsfasf <<< should definitely raise NameError > TypeError: GtkListStore requires at least one argument
I've seen this behavior before, but I never got around to fix it. The problem was that the constructor of GtkListStore (and GtkTreeStore too) was treated as a normal function, eg returning NULL on error instead of -1. Thanks for reporting it. However, it's a bit risky reporting stuff here on the mailing list, since it's easy to "lose" them. It's better to report stuff in bugzilla, cause they will stay there and annoy us until they're fixed. -- Johan Dahlin <[EMAIL PROTECTED]> Async Open Source _______________________________________________ pygtk mailing list [EMAIL PROTECTED] http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
