This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Jython/Python and the fly likes Jython AttributeError ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Languages » Jython/Python
Bookmark "Jython AttributeError ??" Watch "Jython AttributeError ??" New topic

Jython AttributeError ??

Raj Sikka
Ranch Hand

Joined: Apr 11, 2003
Posts: 34
What is the root cause for the following error in Jython.
AttributeError: 'dict' object has no attribute 'containsKey'.
Pls suggest me the solution .
Thanks ,
URGENT removed from topic...
[ January 13, 2004: Message edited by: Barry Gaunt ]
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Maybe you want to use has_key('foo') instead of containsKey('foo')? As in:

Hint: To see the attributes of an object x you can do dir(x)

[ January 13, 2004: Message edited by: Barry Gaunt ]

Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
It is sorta covered in the JavaRanch Style Guide.
subject: Jython AttributeError ??
Similar Threads
WAS Websphere abort application startup / deployment
AttributeError when calling pyhton scripts from java class
Embedded Scripting Languages: Success Stories? Jython?