Bugs item #1520327, was opened at 2006-07-11 03:40
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1520327&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: Milind (t-milich)
Assigned to: Nobody/Anonymous (nobody)
Summary: __missing__ does not get called

Initial Comment:
On the last step a[10] we expect 100
>>> class A(dict):
...     pass
...
>>> a = A({1:2})
>>> def foo(a,b): return 100
...
>>> a.__missing__ = foo
>>> a[1]
2
>>> a.__missing__(10,20)
100
>>> a[10]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyError: 10

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1520327&group_id=5470
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to