#2 Vector3 (and other list-type converted) Quirks

closed-wont-fix
nobody
None
3
2008-08-19
2008-08-19
No

I realize this is dead simple to work-around at this point by just manually retrieving values by logical index, so I'm not sure if I'd call this a bug as much as a quirk, but...

------------------
simple = ogre.Vector3(2,5,6)
print simple[0]
print simple[1]
print simple[2]
# As you'd expect so far, however you don't have to stop there strangely.
print simple[3]
print simple[4]
print simple[78]
print simple[12893]
------------------

Is the jargon generated beyond the vector's three values intended?

Additionally, iterating the vector as a list will give you a nigh endless stream of results due to the above. Attempting to typecast the vector to a list/tuple will crash the program (at least on my simple setup). Lack of methods also prevents you from doing simple[0:2] to get just the first 3 values.

Discussion

  • Andy

    Andy - 2008-08-19
    • labels: 933663 -->
    • priority: 5 --> 3
    • status: open --> closed-wont-fix
     
  • Andy

    Andy - 2008-08-19

    Logged In: YES
    user_id=1684063
    Originator: NO

    This enhancement requires changes to Boost and possibly impacts the amount of handwrapper code (which I want to keep to a minimum).. So while acknowledging that the operation could be more 'pythonic' there is a reality to wrapping a C++ library and this is one of them :)...

     

Log in to post a comment.