IRC logs of #tryton for Sunday, 2010-08-22

chat.freenode.net #tryton log beginning Sun Aug 22 00:00:02 CEST 2010
-!- sharoon(~sharoon@opg066b.halls.manchester.ac.uk) has joined #tryton02:32
-!- digitalsatori(~tony@116.233.253.200) has joined #tryton02:51
-!- sharoon(~sharoon@opg066b.halls.manchester.ac.uk) has joined #tryton03:05
-!- yangoon(~mathiasb@p549F50DB.dip.t-dialin.net) has joined #tryton05:19
-!- Okko(~Okko@dhcp-077-251-140-095.chello.nl) has joined #tryton09:09
-!- digitalsatori(~tony@116.233.241.138) has joined #tryton10:12
-!- Okko(~Okko@dhcp-077-251-140-095.chello.nl) has joined #tryton10:58
-!- sharoon(~sharoon@vpn57.its.manchester.ac.uk) has joined #tryton12:10
-!- digitalsatori(~tony@116.233.243.113) has joined #tryton13:05
-!- ikks(~ikks@190.158.116.172) has joined #tryton14:24
-!- digitalsatori(~tony@116.233.249.36) has joined #tryton14:46
-!- bechamel(~user@host-85-201-147-56.brutele.be) has joined #tryton14:51
-!- digitalsatori(~tony@116.233.247.191) has joined #tryton16:39
-!- enlightx(~enlightx@dynamic-adsl-94-34-197-163.clienti.tiscali.it) has joined #tryton17:12
-!- juanfer(~juanfer@186.28.213.161) has joined #tryton17:40
-!- gremly(~gremly@190.26.186.242) has joined #tryton17:41
-!- gremly(~gremly@190.26.186.242) has joined #tryton17:43
-!- digitalsatori(~tony@116.233.247.191) has joined #tryton18:16
-!- digitalsatori(~tony@116.233.247.191) has joined #tryton18:20
-!- digitalsatori(~tony@116.233.247.191) has joined #tryton18:33
-!- plantian(~ian@c-69-181-194-95.hsd1.ca.comcast.net) has joined #tryton18:38
-!- digitalsatori(~tony@116.233.247.191) has joined #tryton18:39
-!- udono(~udono@dynamic-unidsl-85-197-17-55.westend.de) has joined #tryton20:37
-!- Okko(~Okko@dhcp-077-251-140-095.chello.nl) has joined #tryton21:22
-!- gremly(~gremly@190.26.186.242) has joined #tryton22:33
-!- sharoon(~sharoon@vpn26.its.manchester.ac.uk) has joined #tryton22:34
sharooncedk: something related to imports22:34
sharooncedk: at the moment all modules use `from foo import bar`22:35
sharooncedk: this is not a recommended practice in python for imports according to http://docs.python.org/faq/programming.html#what-are-the-best-practices-for-using-import-in-a-module22:36
sharooncedk: could you please guide/advice on the developer guidelines as to how tryton should do it? __all__ or name imports ? (like from foo import bar1, bar2)22:36
bechamelsharoon: I don't see where this page tell to avoid 'from foo import bar', or maybe I don't understand your remark ?22:46
sharoonbechamel: it says avoid from foo import *22:47
sharoonbechamel: it was a type in second message22:47
sharoonbechamel: we currently use `from foo import *`22:47
bechamelsharoon: yes but only in the __init__.py files22:48
sharoonbechamel: yes, is there any specific reason why we do so?22:48
sharoonbechamel: though it may be called only once per db22:48
bechamelsharoon: I don't know why it's implemented like that, it's openerp legacy22:50
sharoonbechamel: ok, i guess thats the source of the warning message we get when we start tryton saying that the module has already been imported22:51
bechamelbut ... tryton modules are not python modules, they doesn't work if they are not imported by the server22:52
sharoonbechamel: probably we could have this on low priority but immediately update the http://code.google.com/p/tryton/wiki/CodingGuidelines22:52
sharoonbechamel: it specifically says except for __init__ module, which was my concern if its done for any specific reason22:52
bechamelI think the "already imported" message is a result of installing eggs and running tryton from a mercurial repo22:53
bechamelthe reason to avoid 'import *' is because it clutters the namespace. For the __init__.py files this it not a problem, it's only boilerplate code22:58
bechamelI'm completly ok to break guidelines where it makes sense22:59
bechamelsharoon: actually the only role of the __init__.py file is to tell which *.py file to load, just like the 'xml' list in  __tryton__.py for the xml files. So, one can imagine creating a 'py' list in the __tryton__ and drop __init__.py23:08
sharoonbechamel: understand what you mean23:09

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!