Ok, I figured it out: __radd__ function is only called if the left operand does not support the corresponding operation and the operands are of different types. For instance, to evaluate the expression x - y, where y is an instance of a class that has an __radd__() method, y.__radd__(x) is called if x.__add__(y) returns NotImplemented.
2011/3/16 Alexandre Conrad <alexandre.con...@gmail.com> > > Hi Chris, > > I checked-in a bunch of coverage for webob.acceptparse yesterday while I was > on flying back to SFO after PyCon, thanks to DVCS. There's still a little > more to do, but I can't figure out is how to test an __radd__ special method? > Any ideas how I can do that? (without calling it directly). > > It was nice to meet y'all and hacking together in the Pyramid room. > > Best, > -- > Alex | twitter.com/alexconrad -- Alex | twitter.com/alexconrad -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-devel@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.