Why dose 'OneOf' object have no attribute 'is_a' (answered)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Why dose 'OneOf' object have no attribute 'is_a' (answered)

William
This post was updated on .
OneOf is regarded as atomic concept, So why dose 'OneOf' object have no attribute 'is_a'? It really could have one.

Reply | Threaded
Open this post in threaded view
|

Re: Why dose 'OneOf' object have no attribute 'is_a'

Jiba
Administrator
Hi,

You mean, an empty is_a list ?

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Why dose 'OneOf' object have no attribute 'is_a'

William
Er...
I just got AttributeError: 'OneOf' object has no attribute 'is_a', when calling OneOf({something here}).is_a.
It is not about an empty list, it implies that is_a method is not defined in OneOf class.
Reply | Threaded
Open this post in threaded view
|

Re: Why dose 'OneOf' object have no attribute 'is_a'

Jiba
Administrator
Yes, but logically, a OneOf class does not inherit from any other classes...

I've just added an is_a property to class constructs (most of them are classes).

Jiba