I am trying to get the subclasses of a class. This is pretty easy in
CPython but seems to not work correctly in PYJS
Consider the following classes
class A(object):
pass
class B(A):
pass
class C(A):
pass
In CPython
print str(A.__subclasses__())
Gives
[<class '__main__.B'>, <class '__main__.C'>]
But in PYJS __subclasses__ does not exist. However there is a
__sub_classes__ but
print str(A.__sub_classes__)
Unfortunately this retuns
class pyjssubclassesbug.C
In pyjs we get the class of the last subclass defined. This seems to all be
in error. The different between __subclasses__ and __sub_classes__ seems to
just be a spelling mistake but the rest of the problems just seem like a
bug. Is it? Or is this some lind of limitation of javascript or the pyjs
compiler?
Otherwise, I am finding this project to be really useful. Many thanks to
the authors.
Mark
--
---
You received this message because you are subscribed to the Google Groups
"Pyjs.org Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.