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

John Carlson yottzumm at gmail.com
Sun Dec 5 09:49:55 PST 2021


Hmm.  I’d almost prefer if _X3DNode be a subclass of _X3DField.  I’m  not
pretending any  expertise, I am more working with MFNode and how to make it
iterable now.   I can probably live with overwriting now.  I think I
discovered that MFNode has value instead of children.

Perhaps all MF fields should be iterable?

Thanks.

John

On Sun, Dec 5, 2021 at 5:59 AM vmarchetti at kshell.com <vmarchetti at kshell.com>
wrote:

> 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/22fb4d92/attachment.html>


More information about the x3d-public mailing list