logo       

Re: To stupid to live??? Problems with coercing non-numeric types.: msg#00051

lang.jython.user

Subject: Re: To stupid to live??? Problems with coercing non-numeric types.

On 5/23/05, Alex Pollitt <Alex.Pollitt@xxxxxxxxxxxxxxxxxx> wrote:
> So all of the following work fine with Z:
>
>
> print z #calls z.__str__()
> print repr(z) #calls z.__repr__()
> print "z is " + z + "." #calls z.__coerce__()
>
> But the x.myMethod(y, z) does not work, and does not call z.__coerce__()
> either.

Just a guess:

What if you do self.__type__ = 'String' or similar during initialization?

--
// jack


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_idt12&alloc_id344&op=click


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise