[Python-Dev] [python] Should we do away with unbound methods in Py3k? (original) (raw)
Guido van Rossum guido at python.org
Thu Nov 22 04:16:27 CET 2007
- Previous message: [Python-Dev] [python] Should we do away with unbound methods in Py3k?
- Next message: [Python-Dev] Should we do away with unbound methods in Py3k?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Nov 21, 2007 4:25 PM, Steven Bethard <steven.bethard at gmail.com> wrote:
Though I'd like to know what happens when I do something like::
>>> class C(object): ... def setitem(self, key, value): ... print key, value ... >>> c = C() >>> dict.update(c, foo='bar') Traceback (most recent call last): File "", line 1, in TypeError: descriptor 'update' requires a 'dict' object but received a 'C' I assume the code will fail (though it would be really cool if it didn't). How will it fail?
I expect it won't change -- built-in types use a different mechanism.
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] [python] Should we do away with unbound methods in Py3k?
- Next message: [Python-Dev] Should we do away with unbound methods in Py3k?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]