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__
------------------------------------

Not so on the version that comes with zope.
(B.__bases__ will remain 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 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 the case with standard python.
>
>     Is this intentional?  If so, what is the reasoning behind this?
>

You mean the Windows binaries? This should be a standard Python version.
However by do you want to modify __bases__? This sounds like a very evil
hack to me. What's your usecase?

-aj

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to