From: Ivan V. i B. <iv...@ca...> - 2006-10-16 16:37:31
|
En/na Tim Hochberg ha escrit:: > Ivan Vilata i Balaguer wrote: >> >> for i, x in enumerate(args): >> if isConstant(x): >> args[i] =3D ConstantNode(x) >> elif not isinstance(x, ExpressionNode): >> raise TypeError( "unsupported object type: %s", >> type(x) ) >> >> Do you think this is OK, or am I wrong or missing something? >=20 > That looks right. I'm not entirely happy with this fix; I believe that = > returning NotImplemented was intentional with the idea that we might=20 > someday want to use the NotImplemented machinery. That said, I can't=20 > think of a better fix and I don't see us using the NotImplemented=20 > machinery anytime soon, so I imagine it should go in. Maybe placing a comment there should be enough for future reference. By the way, I noticed that I splipped a bad string interpolation there, it should be ``"unsupported object type: %s" % type(x)``. Cheers, :: Ivan Vilata i Balaguer >qo< http://www.carabos.com/ C=C3=A1rabos Coop. V. V V Enjoy Data "" |