Re: type of list element

"Rick Giuly" <[email protected]>
Newsgroups gmane.comp.breve
Message-ID <000f01c3a4e1$a5dbd3f0$0401a8c0@horse>
> > Given an arbitrary list, how do you determine the type of a list
> > element
> > (type could be int, string, object, etc.) ?
>
> There's no real way to do this from steve -- what is the list being used
> for that it contains these unknown types?
>
> - jon klein

The list is for storing a BNF grammar, sortof. It's a list of list of lists
and objects, and I want it to print nice. Determing types makes writing a
general recursive print function possible. If I could define how objects
'print', that would work too.

While we're on the subject of printing, is there a command like 'print' that
prints without a newline at the end?

-Rick

_______________________________________________
breve mailing list
[email protected]
http://www.spiderland.org/mailman/listinfo/breve
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.