Re: [Zope-dev] Acquisition wishlist :-)

2001-01-09 Thread Martijn Pieters
On Mon, Jan 08, 2001 at 10:38:22PM +0100, Dieter Maurer wrote: Martijn Pieters writes: On Mon, Jan 08, 2001 at 10:10:34AM +, Chris Withers wrote: You wouldn't need to have index_html = None if it is inherited, since the inherited idnex_html would be used before one is acquired,

Re: [Zope-dev] Acquisition wishlist :-)

2001-01-08 Thread Chris Withers
Dieter Maurer wrote: Chris Withers writes: And I suppose the other part of my wishlist: class MyClass(Acquisition.Implicit): # your_attribute will be acquied # index_html won't index_html = None No, that is not enough! As a side effect to turn off

Re: [Zope-dev] Acquisition wishlist :-)

2001-01-08 Thread Martijn Pieters
On Mon, Jan 08, 2001 at 10:10:34AM +, Chris Withers wrote: Dieter Maurer wrote: Chris Withers writes: And I suppose the other part of my wishlist: class MyClass(Acquisition.Implicit): # your_attribute will be acquied # index_html won't

Re: [Zope-dev] Acquisition wishlist :-)

2001-01-08 Thread Dieter Maurer
Martijn Pieters writes: On Mon, Jan 08, 2001 at 10:10:34AM +, Chris Withers wrote: You wouldn't need to have index_html = None if it is inherited, since the inherited idnex_html would be used before one is acquired, surely? Yup. If you don't want to have any index_html *at all*,

Re: [Zope-dev] Acquisition wishlist :-)

2001-01-08 Thread Dieter Maurer
Chris Withers writes: Dieter Maurer wrote: Chris Withers writes: And I suppose the other part of my wishlist: class MyClass(Acquisition.Implicit): # your_attribute will be acquied # index_html won't index_html = None No, that is not

Re: [Zope-dev] Acquisition wishlist :-)

2001-01-05 Thread Martijn Pieters
On Thu, Jan 04, 2001 at 10:46:35AM +, Chris Withers wrote: Dieter Maurer wrote: acquisition.donotacquire('index_html') This would be great. Indeed :-) class MyClass (Acquisition.Explicit): acquisition = ClassAcquisitionInfo()

Re: [Zope-dev] Acquisition wishlist :-)

2001-01-05 Thread Shane Hathaway
There's a (much) simpler way: class MyClass(Acquisition.Explicit): your_attribute = Acquisition.Acquired # index_html isn't index_html = None "Acquired" is a special object that the acquisition module looks for. However, I wasn't aware you could add a "1" to the ComputedAttribute

Re: [Zope-dev] Acquisition wishlist :-)

2001-01-05 Thread Chris Withers
Shane Hathaway wrote: There's a (much) simpler way: class MyClass(Acquisition.Explicit): your_attribute = Acquisition.Acquired # index_html isn't index_html = None Cool :-) And I suppose the other part of my wishlist: class MyClass(Acquisition.Implicit): #

Re: [Zope-dev] Acquisition wishlist :-)

2001-01-05 Thread Dieter Maurer
Chris Withers writes: And I suppose the other part of my wishlist: class MyClass(Acquisition.Implicit): # your_attribute will be acquied # index_html won't index_html = None No, that is not enough! As a side effect to turn off acquisition, you defined the

Re: [Zope-dev] Acquisition wishlist :-)

2001-01-04 Thread Chris Withers
Dieter Maurer wrote: acquisition.donotacquire('index_html') This would be great. Indeed :-) class MyClass (Acquisition.Explicit): acquisition = ClassAcquisitionInfo() acquisition.acquire('index_html') acquisition.acquire('fred') You already can do

Re: [Zope-dev] Acquisition wishlist :-)

2001-01-03 Thread Chris Withers
Jim Fulton wrote: I'm inclined to think that in some future version of Zope, we should switch to making explicit acquisition the norm. Well, implicit is good when you're starting, but can cause fun with security later. Hmmm, I guess I like the way it is but my wishlist (damn, Christmas just