[EMAIL PROTECTED] a écrit : > I have a data structure that looks like this: > (snip) > > I get the following error: (snip) > AttributeError: 'list' object has no attribute 'keys'
Already answered. > Here is where it gets weird: > > type(song) (snip) > TypeError: 'str' object is not callable You code snippet started with: if type == 'artist': which implies you bound the name 'type' to a string. Then you try to use the object bound to name 'type' as a callable. Python's bindings are just name=>object mappings, and nothing prevents you to rebind a builtin name. IOW, avoid using builtins types and functions as identifiers. HTH -- http://mail.python.org/mailman/listinfo/python-list