Re: [Vala] Printfing an object



It's not possible to do that for every type.


On Sun, Nov 17, 2013 at 2:10 PM, Donn <donn ingle gmail com> wrote:

Hi,
In python one can "print (someobject)" and get a nice hash kind of thing.
Is there any equiv way of printf-ing an object in vala/gobj?

e.g. <__main__.A instance at 0x1989320>

At the moment I'm making a repr() method (via a static counter to generate
a unique number per new instance) and printing myobj.repr(), which is ok.
But .. maybe there's a better way?


\d
_______________________________________________
vala-list mailing list
vala-list gnome org
https://mail.gnome.org/mailman/listinfo/vala-list




-- 
www.debian.org - The Universal Operating System


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]