* classobject.[ch], {float,long,int}object.c, bltinmodule.c:

coercion is now completely generic.
* ceval.c: for instances, don't coerce for + and *; * reverses
  arguments if left one is non-instance numeric and right one sequence.
This commit is contained in:
Guido van Rossum 1992-08-14 12:06:52 +00:00
parent 70d7a310a9
commit e6eefc2231
7 changed files with 123 additions and 93 deletions

View file

@ -43,5 +43,4 @@ extern object *newinstancemethodobject PROTO((object *, object *));
extern object *instancemethodgetfunc PROTO((object *));
extern object *instancemethodgetself PROTO((object *));
extern int instance_coerce PROTO((object **, object **));
extern object *instance_convert PROTO((object *, char *));

View file

@ -142,6 +142,7 @@ typedef struct {
object *(*nb_and) FPROTO((object *, object *));
object *(*nb_xor) FPROTO((object *, object *));
object *(*nb_or) FPROTO((object *, object *));
int (*nb_coerce) FPROTO((object **, object **));
} number_methods;
typedef struct {