Re: [Zope] Modifying __bases__

2005-05-20 Thread Andreas Jung
--On Freitag, 20. Mai 2005 12:32 Uhr -0400 Dan Pozmanter [EMAIL PROTECTED] wrote: Hey, I noticed that the version of python that ships with zope is restricted, such that when you create an instance of a class, you are no longer able to modify __bases__ for that class object. This is not

RE: [Zope] Modifying __bases__

2005-05-20 Thread Dan Pozmanter
unchanged.) What I aim to do is have the User Object inherit from a custom class (AlienUser). -Original Message- From: Andreas Jung [mailto:[EMAIL PROTECTED] Sent: Friday, May 20, 2005 12:46 PM To: Dan Pozmanter; zope@zope.org Subject: Re: [Zope] Modifying __bases__ --On Freitag, 20. Mai

RE: [Zope] Modifying __bases__

2005-05-20 Thread Tino Wildenhain
Am Freitag, den 20.05.2005, 13:48 -0400 schrieb Dan Pozmanter: Well, when I run it, I am able to do the following: class A: pass class B(A): pass b = B() B.__bases__ = () print B.__bases__

Re: [Zope] Modifying __bases__

2005-05-20 Thread Paul Winkler
On Fri, May 20, 2005 at 01:48:46PM -0400, Dan Pozmanter wrote: What I aim to do is have the User Object inherit from a custom class (AlienUser). You can do that in two ways off the top of my head: 1) the good way: write a custom UserFolder. You could probably get away with just inheriting from

Re: [Zope] Modifying __bases__

2005-05-20 Thread Chris McDonough
You might also be able to do the __bases__ hack with Zope 2.8 (as long as Python 2.3+ allows you to assign to it), as it reimplements ExtensionClass using metaclasses instead of custom C hackery. On Fri, 2005-05-20 at 14:46 -0400, Paul Winkler wrote: On Fri, May 20, 2005 at 01:48:46PM -0400, Dan

RE: [Zope] Modifying __bases__

2005-05-20 Thread Dan Pozmanter
Going with 2.8 sounds like a rather good solution. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris McDonough Sent: Friday, May 20, 2005 3:01 PM To: Paul Winkler Cc: zope@zope.org Subject: Re: [Zope] Modifying __bases__ You might also be able to do

RE: [Zope] Modifying __bases__

2005-05-20 Thread Dan Pozmanter
: [Zope] Modifying __bases__ Am Freitag, den 20.05.2005, 13:48 -0400 schrieb Dan Pozmanter: Well, when I run it, I am able to do the following: class A: pass class B(A): pass b = B() B.__bases__ = () print B.__bases__

Re: [Zope] Modifying __bases__

2005-05-20 Thread Paul Winkler
On Fri, May 20, 2005 at 05:10:30PM -0400, Dan Pozmanter wrote: What is morally wrong with modifying live objects in a dynamic language to achieve desired functionality? The idea is I want to modify the zope core in a way that survives version to version, yet does not impose a specific use