Re: [tryton-dev] New __init__ style

2016-08-24 Thread Cédric Krier
On 2016-08-24 16:44, Mathias Behrle wrote: > Alternative: > > from category import Category > from party import Party, PartyCategory > ... > > def register(): > ...no need to change > > > While this should meet all three advantages cited above as well, it has for me > the

Re: [tryton-dev] New __init__ style

2016-08-24 Thread Mathias Behrle
* Cédric Krier: " [tryton-dev] New __init__ style" (Wed, 24 Aug 2016 12:59:25 +0200): > 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

Re: [tryton-dev] New __init__ style

2016-08-24 Thread Cédric Krier
On 2016-08-24 13:15, Sergi Almacellas Abellana wrote: > I have an additional doubt: If we remove the "import *" we can also remove > the __all__ attribute from imported files? I think it is good practice to define what is public. -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com

Re: [tryton-dev] New __init__ style

2016-08-24 Thread Jean Cavallo
2016-08-24 13:15 GMT+02:00 Sergi Almacellas Abellana : > 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

Re: [tryton-dev] New __init__ style

2016-08-24 Thread Sergi Almacellas Abellana
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):

[tryton-dev] New __init__ style

2016-08-24 Thread Cédric Krier
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