On Sat, Jan 21, 2012 at 6:56 PM, Greg Ewing <[email protected]> wrote: > 馬吉軍 wrote: >> >> I found one small bugs in PyGUI when I run blobedit.py under python 3.2: > >> >> >> File "C:\Python32\lib\site-packages\GUI\GStdMenus.py", line 82 >> include = include + sum(always_include) >> ^ >> TabError: inconsistent use of tabs and spaces in indentation >> >> *Fix:* >> Replace line 81 in C:\Python32\lib\site-packages\GUI\GStdMenus.py: >> >> #include = include + sum(always_include) >> include = include.intersection(sum(always_include)) > > > I don't understand this. There doesn't seem to be anything wrong with > the indentation around that line in my source, and even if there was, > I don't see how the change you suggest would fix it, except by the > side effect of changing the whitespace. > > Is this a bug in Python 3.2? Has anyone else seen this? I don't have > a 3.2 installation at hand to test it on, and I'm reluctant to change > anything until I understand what's going on better. > > -- > Greg I think the OP must have caused an indentation error trying to fix the bug. I get the following (Vista PyGUI-2.5.3 Python3.2.2) Traceback (most recent call last): File "blobedit.py", line 132, in <module> BlobApp().run() File "c:\python32\lib\site-packages\GUI\GApplications.py", line 144, in run self.menus = basic_menus() File "c:\python32\lib\site-packages\GUI\StdMenus.py", line 53, in basic_menus exclude = exclude) File "c:\python32\lib\site-packages\GUI\GStdMenus.py", line 81,in build_menus include = include + sum(always_include) TypeError: unsupported operand type(s) for +: 'set' and 'set'
The demo runs with the proposed fix but it also runs using "union" rather than "intersection" which seems more appropriate for the '+' operator. But I don't really understand the code very well. Probably the correct solution is to make '+' work. I haven't tried any fix on Python 2. _______________________________________________ Pygui mailing list [email protected] http://mail.python.org/mailman/listinfo/pygui
