vmo
vmo copied to clipboard
Change first state's feature / symbol
I think having (for all newly created oracle
) oracle.symbol[0] == None
rather than oracle.symbol[0] == 0
would make more sense.
What do You think about it?
I think it was setup like that so when casting something like y = numpy.array(oracle.symbol)
you do not have to worry about the type, but at the end I think it`s an implementation choice since most of the time we start from oracle.symbol[1:]. What do you think?
Yes, I can see that. But changing it to None
actually doesn't pose a problem when doing such a cast (since Python's lists and arrays don't have a single-type content requirement).
And in my opinion, it is better to worry about the types (unless You're working with inheritance or subtyping and it actually makes sense not to want to worry about the types, since it is all properly handled by the language) when something is so implementation dependant and not really semantic.
(Plus, in that perspective, one would constrain all symbols to be of type int
, which isn't the only meaningful way to see things. Why not char
s for instance?)
Alright, it does actually mess up the codebase, You were right. And then again, the typing system in Python being what it is, Your way of seeing things also makes sense. I'm being too demanding with it at times.
Might have to think more about that one before changing anything!