On Wed, Sep 19, 2018 at 12:25 PM kiteh <kiteh.0...@gmail.com> wrote:

> Hi Justin,
>
> Many thanks for getting back to me on this.
>
> I do have some questions (kindly pardon my questions).
>
> 1. Why is there a need to use `enumerate`? It seems that the variable -
> `i` is not being used anywhere.. If so, wouldn't it be better to use/ write
> it as
> for part in (parts):
>     ...
>
>
You can remove that and just use "for part in parts". I forgot to revert
than line when I had removed some test code that was using it.

2. I am still not quite understanding the usage of `PATH_ROLE` or
> `self.PATH_ROLE`? Especially the latter not being declared anywhere before
> it has been used?
>

PATH_ROLE has been declared as a class variable on line 11. Thus it is
accessible as a member on the class or instances of that class. You could
make it a global to the whole module if you wanted. But it is a bit tidier
to scope the constants with the class that is using them.


>
> 3. Lastly, about the `itemFromPath()`, what is the argument - `parent`?
>

`parent` is the parent QTreeWidgetItem where you want to start searching.
Otherwise it defaults to starting from the root of the tree, recursively.


> --
> You received this message because you are subscribed to the Google Groups
> "Python Programming for Autodesk Maya" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to python_inside_maya+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/python_inside_maya/646bd0ca-9316-4e09-9b21-28e593231578%40googlegroups.com
> <https://groups.google.com/d/msgid/python_inside_maya/646bd0ca-9316-4e09-9b21-28e593231578%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA3ujXFkS2RjTmk9V-sVAh-d0zGD-T%3DemDmSLh16xEOMWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to