globals()<http://docs.python.org/2/library/functions.html?highlight=globals#globals>is a Python built-in function that returns a dictionary of objects in the current global environment. You can use it to check whether a particular object name exists in the current environment to avoid generating an exception by referencing a name that doesn't exist. The .get() method can be used with any dictionary -- the first argument is the key you want to retrieve from the dictionary, and the second is a default value to return in case the key does not exist.
Anthony On Sunday, May 26, 2013 3:38:17 PM UTC-4, André Kablu wrote: > > Hi all, > > I have been adventuring myself with web2py for some months now, just to > learn it, and I am enjoying very much. web2py is an awesome MVC. > > However it is my first time with python (yes I am only using python now > b/c of web2py :D ), and I am missing so much some kind of "functions index" > for web2py. > > Let me show an example, today I was looking for some details on the > function globals().get(param,param2) > I don`t know what param1 and param2 means, for what they are used... and I > could not find anything googling... > > I know this is a kind of noob question but it is the reality for some guys > like me that are not heavy coders... so I needed more information. > > Did anybody knows where I can find more reference to all web2py exclusive > functions, like what we have on jquery website about jquery functions for > an example? > > Thanks guys! > -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.