[Zope-dev] Referring to same interface using zope.schema.Object

2011-07-22 Thread Joe Steeve
Hello, I am trying to construct an object tree. Every node in the tree is of the same type. I am trying to achieve something like: class INode(Interface): parent = Object( title=uParent node, schema=INode )

Re: [Zope-dev] Referring to same interface using zope.schema.Object

2011-07-22 Thread Brian Sutherland
On Fri, Jul 22, 2011 at 04:29:32PM +0530, Joe Steeve wrote: Hello, I am trying to construct an object tree. Every node in the tree is of the same type. I am trying to achieve something like: class INode(Interface): parent = Object(

Re: [Zope-dev] Referring to same interface using zope.schema.Object

2011-07-22 Thread Jacob Holm
On 2011-07-22 13:26, Brian Sutherland wrote: This would be my first guess: class INode(Interface): pass INode.parent = Object( title=uParent node, schema=INode ) INode.children = List( title=u'Child nodes',

Re: [Zope-dev] Referring to same interface using zope.schema.Object

2011-07-22 Thread Brian Sutherland
On Fri, Jul 22, 2011 at 01:41:32PM +0200, Jacob Holm wrote: On 2011-07-22 13:26, Brian Sutherland wrote: This would be my first guess: And that guess would be wrong. Thanks. Guess I should stop guessing;) -- Brian Sutherland ___ Zope-Dev

Re: [Zope-dev] Referring to same interface using zope.schema.Object

2011-07-22 Thread Robert Niederreiter
Hi, On 22.07.2011 12:59, Joe Steeve wrote: Hello, I am trying to construct an object tree. Take a look at http://pypi.python.org/pypi/node This is probably what you need. Regards, Robert Every node in the tree is of the same type. I am trying to achieve something like: class

Re: [Zope-dev] Referring to same interface using zope.schema.Object

2011-07-22 Thread Michael Howitz
Am 22.07.2011 um 15:30 schrieb Robert Niederreiter: Hi, On 22.07.2011 12:59, Joe Steeve wrote: Hello, I am trying to construct an object tree. Take a look at http://pypi.python.org/pypi/node This is probably what you need. or even http://pypi.python.org/pypi/zope.container might be