Bug in jythosh.. ops IJython

2 views
Skip to first unread message

Kostas Georgiou

unread,
Feb 3, 2008, 9:53:45 PM2/3/08
to ijytho...@googlegroups.com
For the second time i want to say that it is great that you had forked this great project. The name also is very nice.

So to get in the point, this is the first bug report.
So in Calltip class, line 412 it reverses the default arguments. So after the for-loop if you call the same function this will be solved.

We planned to intergrate jythopnshell in our project (http://scgroup2.ceid.upatras.gr:8000/JylabHomepage) , but this bug prevented us from doing it. Now hopefully we will.

As ijython will be first-class component in our project we will be glad to contribute to it.

Kostas Georgiou

Dan Dromereschi

unread,
Feb 4, 2008, 8:57:31 AM2/4/08
to ijytho...@googlegroups.com
Hi Kostas,

Regarding the bug report that you have submitted, I think the code below is the one you mentioned. I guess you have an old version, because in the one we have, this is fixed and works fine:

        java.util.List<StringBuilder> defaults = new ArrayList<StringBuilder>();
        if( pf.func_defaults != null ){
               
            java.util.List df = new ArrayList( pf.func_defaults.length);
            for(PyObject po: pf.func_defaults)
            df.add(po);
            Collections.reverse( df );
            for( Object o: df ){
                   
                StringBuilder sb2 = args.get( id );
                sb2.append( "=" ).append( o.toString() );
                args.remove( id );
                id--; 
                defaults.add( sb2 );
                   
            }
               
               
        }
        Collections.reverse( defaults );

Please let me know if I misunderstood anything.

Regards,

Dan
Reply all
Reply to author
Forward
0 new messages