[Zope3-dev] "Sub interface"

Terry Hancock hancock at anansispaceworks.com
Thu Mar 4 19:07:54 EST 2004


On Monday 01 March 2004 09:05 am, Jim Fulton wrote:
> Terry Hancock wrote:
>  > or is that merely duplicating
> > the schema module's code?
> 
> I don't understand the last part. What code do you think you'd be
> duplicating.

Well, I thought that defining a field to be a "Tuple" might
be exactly identical to defining it as an "Object" with
"schema=ITuple".  If so, then always using Object with
the interface always specified via "schema" would be
redundant and unnecessarily obtuse to read.

However, line 214 in _field.py sets _type=tuple, so it
appears that we are constraining the actual type with
Tuple, not just the interface (which is therefore not
equivalent to using Object).

So I think you answered my question.

Cheers,
Terry

--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks  http://www.anansispaceworks.com



More information about the Zope3-dev mailing list