[x3d-public] Results for today with x3d.py, _X3DField

vmarchetti at kshell.com vmarchetti at kshell.com
Sun Dec 5 03:59:26 PST 2021


Python does support multiple inheritance, but these fragments are not an example of a multiple-inheritance situation -- rather, the later class definition -- where _X3DField is a subclass of _X3DNode, overwrites the earlier class definition.

In the x3d.py file, only three classes are defined as direct subclasses of object:

class _X3DField
class _X3DNode
class _X3DStatement

So I think the operative question is whether it is a design intent that _X3DField also should be a subclass of _X3DNode.  I judge the answer is no, since that would include support for DEF, USE, and metadata. In that light, the second class defintion for _X3DField would be regarded as a bug, to be corrected by modifying the X3duomToX3dPythonPackage.xslt stylesheet.

> On Dec 4, 2021, at 11:40 PM, John Carlson <yottzumm at gmail.com> wrote:
> 
> Two declarations of _X3DField?
> 
> $ grep "class _X3DField" x3d.py          
> 
> 
> class _X3DField(object): 
> class _X3DField(_X3DNode):
> 
> Is there a pylint?
> 
> Isn't multiple inheritance possible?
> 
> Thanks!
> 
> John
> 
> 
> _______________________________________________
> x3d-public mailing list
> x3d-public at web3d.org
> http://web3d.org/mailman/listinfo/x3d-public_web3d.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20211205/a6f72f65/attachment.html>


More information about the x3d-public mailing list