Thanks Martin

However the line:
del db[key]
results in an error: (1, 'Operation not permitted')
(only tested on Python 2.3.5)
Could this be because the .del() method of the dictionary
has not been implemented either? In fact in my tests
any attempt at altering the db by use of normal dictionary
methods fails with the same error. e.g.
db['newkey']='newvalue' causes the same error.
(again, only tested on Python 2.3.5)
So it seems only those methods listed by dir()
have been implemented, which is what I would expect.

Thanks for your info on the rules for interface implementation
in Python. That is an interesting difference. I have grown to
like the rules for java interface implementation because you
are guaranteed that all defined methods for the interface have
been implemented. That is what is meant by "implementing" an
interface in java. Although I dont deny the Python way may also
have its advantages, just different ones!

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to