This seems to work fine in 2.2beta1 :-) Does anyone know what's
missing in the 2.3 branch?
On 2/26/07, Henrik Eriksson <henke.eriksson@...> wrote:
> What is the status on metaclasses in Jython?
> The below interaction illustrates a problem I noticed:
> >>> class Printable(type):
> ... def whoami(cls): print "I am a ", cls.__name__
> >>> class Bar:
> ... __metaclass__ = Printable
> ... def foo(self):
> ... print "foo"
> >>> Bar.whoami()
> I am a Bar
> >>> b = Bar()
> >>> b.foo()
> Traceback (innermost last):
> File "<console>", line 1, in ?
> AttributeError: '__main__.Bar' object has no attribute 'foo'
> And when invoking type(b) I get:
> <__main__.Printable object 3>
> Are these known issues? (I'm using the 2.3 branch).