From: Gwyn E. <gw...@ci...> - 2004-04-27 08:38:02
|
Hi Michael, Monday, April 26, 2004, 1:27:18 PM, you wrote: CM> Jython 2.1 on java1.3.1_11 (JIT: null) CM> Type "copyright", "credits" or "license" for more information. CM> >>> import java.lang.reflect.Modifier as Modifier CM> >>> Modifier.toString(2) # should return 'private' CM> '2' CM> >>> CM> I expected it to return 'private' but it returned '2' instead. I've CM> got two questions: CM> (1) Why? A bug? :-) I've no idea really! CM> (2) How do I fix it? While I don't like the practice of accessing static routines via instance variables, it does provide a work-around in this case! Continuing on from your code above:- >>> m = Modifier() >>> m java.lang.reflect.Modifier@19fd66a >>> m.toString(2) 'private' >>> -- Best regards, Gwyn |