that makes sense. thanks! I have many list controller functions but probably never used the list type, so this was the first time I ran into this problem.
Alex Am Donnerstag, 8. August 2013 13:47:15 UTC+2 schrieb Anthony: > > Yes, that's how Python works -- if you create an object (including a > function or class) with the same name as a > built-in<http://docs.python.org/2/library/functions.html>, > you shadow the built-in (within that context). However, you will get a > syntax error if you attempt to do the same with any of the Python > keywords<http://docs.python.org/2/reference/lexical_analysis.html#keywords> > . > > Anthony > > On Thursday, August 8, 2013 7:18:55 AM UTC-4, Alex wrote: >> >> I have a type check >> isinstance(myvar, list) >> in a controller. This worked fine until I added a function to the >> controller: >> def list(): >> ... >> >> the built-in list type is overridden and is now a function (controller >> function). The isinstance check does not work anymore. Is this behavior on >> purpose? I guess the best way to avoid such problems is to have no 'list' >> controller function? >> >> Alex >> >> -- --- 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 [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

