On 10/11/07, Luis Zarrabeitia <[EMAIL PROTECTED]> wrote:
>
> Hi there.
>
> I just tried this test:
>
>
> def f(**kwds):
> print kwds
>
> import UserDict
> d = UserDict.UserDict(hello="world")
> f(**d)
>
>
> And it fails with a TypeError exception ("f() argument after ** must be a
> di
On 11 Okt., 06:05, Luis Zarrabeitia <[EMAIL PROTECTED]> wrote:
> Is that behavior expected? Is there any reason (performance, perhaps?) to
> break
> duck-typing in this situation?
I guess it wasn't considered to be relevant writing a coercion
function since there aren't too many dict like types
Hi there.
I just tried this test:
def f(**kwds):
print kwds
import UserDict
d = UserDict.UserDict(hello="world")
f(**d)
And it fails with a TypeError exception ("f() argument after ** must be a
dictionary"). I find that weird, as UserDict should support all protocols that
dict su