2012/6/19 Amaury Forgeot d'Arc <[email protected]>:
>
> Actually I think I found the cause:
> bool.__format__ will correctly call format__Int_ANY(),
> but the object is coerced into a int!
>
> Adding a format__Bool_ANY fixes the problem (with the same implementation)1
> but shouldn't we have W_BoolObject inherit from W_IntObject,
> and remove delegate_Bool2IntObject?
>

I tried inheriting W_BoolObject from W_IntObject, removing
delegate_Bool2IntObject and removing format__Bool_ANY - but then there
is no format implementation for bool. And as I read in multimethod.py,
it does not really interact with subclassing, so inheriting from
W_IntObject will gain nothing here?
Is it better to submit an easy fix first
https://bitbucket.org/kostialopuhin/pypy-fix1180/compare/..pypy/pypy ?
I just don't see what are the benefits of inhering from W_IntObject,
cause I know too little yet)
_______________________________________________
pypy-dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to