For any one unfamiliar with those two methods in Python…
dir returns a list of methods/properties of a specific object.
help returns an objects doc strings.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Lua has no concept of “doc strings.”
All Lua objects are tables (or userdata, but you can’t inspect userdata from Lua code. Well not in Lua 5.1; in 5.2, you can do it if the user who created the userdata wants you to). Therefore, you can just use existing table methods to iterate over the contents of a table:
Note that this will invoke metamethods, so the true contents of the table aren’t known. Then again, if the person who created that object wanted you to have the true contents, he wouldn’t have protected them with metamethods.