[IronPython] why?

Curt Hagenlocher curt at hagenlocher.org
Wed Sep 15 17:44:39 CEST 2004


"J. Merrill" <jvm_cop at spamcop.net> writes:

> Perhaps ReflectedMethodBase.Call needs a new, optional, boolean
> parameter (default false) indicating whether an automatic cast to
> boolean should happen.

What about code like
     ClrObject.Enabled = 1

Shouldn't there be a translation of int <=> boolean there?  As far
as I can tell, the Python boolean type wasn't added until 2.3, and
there are probably still a lot of people (like me) that would write
the code that way.

Maybe it would be more effective to loop through the method list
twice -- disallowing crazy bool conversions the first time and
then allowing them if there weren't any hits.

--
Curt Hagenlocher
curt at hagenlocher.org



More information about the Ironpython-users mailing list