Did you accidentally shadow the "type" symbol with something of your own? What do you see when you do:
print type On Mon, Sep 28, 2015 at 3:06 PM Bryan Silva <[email protected]> wrote: > I've been reading "Maya Python for Games and Films" and I’m having > trouble with something mentioned on page 32. The book mentions that python > provides a built in function, type(), which allows you to determine the > type of a variable at any point. Whenever I try to execute that function > with a variable inside the parenthesis, I get an error in Maya. An > example would be: > > > contents = ‘toys’ > type(contents) > # Error: TypeError: file line 2: ‘module’ object is not callable # > > > I'm actually further along in the book on page 65 where I'm trying to > following along but running into the following: > > > def process_all_textures(): > print(‘process all textures’) > > type(process_all_textures) > # Error: TypeError: file line 4: ‘module’ object is not callable # > > > Any idea why I am getting this error? Other built in Python functions such > as id() work just fine. > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/553d65d8-d08d-4bf0-bfee-3dcc597c54cb%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/553d65d8-d08d-4bf0-bfee-3dcc597c54cb%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA0JJPBBDx5ZzAuApfr71Y2%3DJM%2BnbJhHs0Pzi_gh3t1E2w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
