Recognizing the data type of list-elements

I have a list containing integers and strings. Is there any way to find out, which element is
from which type?

something like:

if myList{i} == <????>: print "its a string"
else print "its an integer"

added for 2.5

This functionality was missing, but I've added it for version 2.5. I hope to make another beta build in the next couple of days.

- jon

That would be great. I hope

That would be great. I hope you shot a big signal-rocket, if this build is ready. I need really need that functionality.

Try this...

Try the new "typeof()" operator in this build. It returns a string indicating the type of a value, so typeof( "x" ) = "string".

http://spiderland.org/breve_2.5b

- jon

Thx a bunch Jon!

Thx a bunch Jon!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.