[Zope3-Users] Re: Why IField.default type is Field ? IField.default
is value of Field then it can't to be the field
Philipp von Weitershausen
philipp at weitershausen.de
Fri Sep 29 04:35:35 EDT 2006
KLEIN Stéphane wrote:
> 2006/9/29, Philipp von Weitershausen <philipp at weitershausen.de>:
>> KLEIN Stéphane wrote:
>> > 2006/9/29, Philipp von Weitershausen <philipp at weitershausen.de>:
>> >>
>> >>
>> >> KLEIN Stéphane wrote:
>> >> > I don't understand why Field.default type is Field ?
>> >>
>> >> What else do you suggest?
>> >>
>> >
>> > NoneType
>>
>> To express what?
>>
>> > or Object
>>
>> Object requires an interface that the object should provide. Default
>> values don't necessarily have to conform to an interface.
>>
>>
>
> Simply, if I do :
>
> myfield.default = u"foobar"
>
> u"foobar" isn't Field type but String.
Field just specifies an attribute. A string is just as good for an
attribute as anythign else.
> Then I don't understand why default type is Field.
Because the default type is arbitrary.
> Well, I know, Python isn't typed language... therefore it's working.
Python is a strongly, dynamically typed language.
More information about the Zope3-users
mailing list