El 24/08/16 a les 12:59, Cédric Krier ha escrit:
Hi,

Since some time, I'm a little bit annoyed by our exception about
"import *" in __init__.py. It will be great if we could have no more
those warning.
So I propose to gradually change our style to use this one (example from
party module):

    import category
    import party
    …

    def register():
        Pool.register(
        category.Category,
        party.Party,
        party.PartyCategory,
        …)

I find that it has three advantages:

    - remove the "import *"
    - remove collision risk about class name
    - show which python file comes a class

What do you think?

It thing is a very good improvement, especially third point as knowing the python file from which the class becomes very usefull for modules with a lot of python files.

I have an additional doubt: If we remove the "import *" we can also remove the __all__ attribute from imported files?



--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

--
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/43cfdaf2-80a8-5694-9d84-a4fd55e24b05%40koolpi.com.

Reply via email to