Hi Chris,

On 9/15/2015 18:02, Chris Barker wrote:
On Tue, Sep 15, 2015 at 2:43 AM, Werner <[email protected] <mailto:[email protected]>> wrote:

    I see the following exception, it seems that in Py3 this is not
    importing methods starting with "_" when doing:

    from .FCObjects import *

    As per doc I think this should already have happened in Py2.7, no?


I would have thought so, yes.


    How to we fix it, add an "__all__" to FCObjects or rename
    "_colorGenerator" to "ColorGenerator"?


well, in theory, _colorGenerator is an implementation detail, and shouldn't be exposed to the user. -- if it's called from outside .FCObjects, then maybe it shouldn't be in there --- and in FloatCanvas instead.

but the easy fix is to just do the __all__ trick, so that's fine, too.

This is really the result of factoring the Object code out into its own module, while trying to to change the API much...

Sorry, no time to look closer right now, so the easy option is fine :-)
It is used just in two places, in FloatCanvas.Group.Bind and in FCObjects.DrawObject.Bind

So, I guess the cleaner option would be to keep it as _colorGenerator and to move the Group class to the FCObjects module, no?

Will give that a try tomorrow and if I can make it work create a PR for it.

See you
Werner
_______________________________________________
FloatCanvas mailing list
[email protected]
http://mailman.paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas

Reply via email to