Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Object object - size  RSS feed

 
Arya Devan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all .. i have a small doubt... if i were to declare something like ..
var x = new Object() and i put something in the variable x . how am i supposed to find the size of this object x ??
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by size? Do you mean a list of all of its properties. An object is not like an array where you can just reference a length.

Eric
 
Arya Devan
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes .... i want the list of all its properties. how should i find it ?
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to look into the for(x in y) loop

Eric
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!