Re: "metaclass conflict" error: where is noconflict ?

2009-02-22 Thread Hrvoje Niksic
"Barak, Ron" writes: > import wx > > class CopyAndPaste(object): > def __init__(self): > pass > > def set_copy_and_paste(self): > ... > > and CopyAndPaste is being called with: > > ... > class ListControlMeta(wx.Frame, CopyAndPaste): > pass You don't need ListControlMeta at all; just inher

RE: "metaclass conflict" error: where is noconflict ?

2009-02-22 Thread Barak, Ron
t; Subject: Re: "metaclass conflict" error: where is noconflict ? > > "Barak, Ron" writes: > > > class CopyAndPaste(): > > CopyAndPaste is an old-style class. Make it a new-style > class, and you'll probably be able to inherit from it and > wx.F

Re: "metaclass conflict" error: where is noconflict ?

2009-02-22 Thread Hrvoje Niksic
"Barak, Ron" writes: > class CopyAndPaste(): CopyAndPaste is an old-style class. Make it a new-style class, and you'll probably be able to inherit from it and wx.Frame without explicitly creating a new metaclass. -- http://mail.python.org/mailman/listinfo/python-list

Re: "metaclass conflict" error: where is noconflict ?

2009-02-22 Thread Chris Rebert
On Sun, Feb 22, 2009 at 3:31 AM, Barak, Ron wrote: >> > Applying your suggestion: >> > >> > class ListControlMeta(type(wx.Frame), type(CopyAndPaste)): >> > pass >> > >> > class ListControl(wx.Frame, CopyAndPaste): >> > def __init__(self, parent, id, title, list, max_list_width, >> > log_s

RE: "metaclass conflict" error: where is noconflict ?

2009-02-22 Thread Barak, Ron
Hi Chris, > -Original Message- > From: Chris Rebert [mailto:c...@rebertia.com] > Sent: Sunday, February 22, 2009 11:48 > To: Barak, Ron > Cc: python-list@python.org; wxpython-us...@lists.wxwidgets.org > Subject: Re: "metaclass conflict" error: where is noco

Re: "metaclass conflict" error: where is noconflict ?

2009-02-22 Thread Chris Rebert
;> Cc: python-list@python.org; wxpython-us...@lists.wxwidgets.org >> Subject: Re: "metaclass conflict" error: where is noconflict ? >> >> On Thu, Feb 19, 2009 at 5:01 AM, Barak, Ron wrote: >> > Hi, >> > >> > I have a class derived

RE: "metaclass conflict" error: where is noconflict ?

2009-02-22 Thread Barak, Ron
Hi Chris, > -Original Message- > From: ch...@rebertia.com [mailto:ch...@rebertia.com] On > Behalf Of Chris Rebert > Sent: Thursday, February 19, 2009 22:58 > To: Barak, Ron > Cc: python-list@python.org; wxpython-us...@lists.wxwidgets.org > Subject: Re: "metaclass

Re: "metaclass conflict" error: where is noconflict ?

2009-02-19 Thread Michele Simionato
On Feb 19, 9:58 pm, Chris Rebert wrote: > On Thu, Feb 19, 2009 at 5:01 AM, Barak, Ron wrote: > > Hi, > > > I have a class derived from two parents (in blue below), which gives me the > > following error: > > > $ python -u ./failover_pickle_demo09.py > > Traceback (most recent call last): > >   Fi

Re: "metaclass conflict" error: where is noconflict ?

2009-02-19 Thread Chris Rebert
On Thu, Feb 19, 2009 at 5:01 AM, Barak, Ron wrote: > Hi, > > I have a class derived from two parents (in blue below), which gives me the > following error: > > $ python -u ./failover_pickle_demo09.py > Traceback (most recent call last): > File "./failover_pickle_demo09.py", line 291, in > c

"metaclass conflict" error: where is noconflict ?

2009-02-19 Thread Barak, Ron
Hi, I have a class derived from two parents (in blue below), which gives me the following error: $ python -u ./failover_pickle_demo09.py Traceback (most recent call last): File "./failover_pickle_demo09.py", line 291, in class ListControl(wx.Frame, CopyAndPaste): TypeError: Error when cal