IRC logs of #tryton for Wednesday, 2010-12-01

chat.freenode.net #tryton log beginning Wed Dec 1 00:00:02 CET 2010
2010-12-01 01:38 -!- ikks(~ikks@190.158.122.179) has joined #tryton
2010-12-01 01:50 -!- cheche(cheche@188.85.213.151) has joined #tryton
2010-12-01 03:30 -!- gremly(~gremly@190.26.156.189) has joined #tryton
2010-12-01 05:14 -!- rednul_(~rednul@host-174-45-250-246.bln-mt.client.bresnan.net) has joined #tryton
2010-12-01 05:20 -!- yangoon(~mathiasb@p549F703C.dip.t-dialin.net) has joined #tryton
2010-12-01 05:23 -!- mhi(~mhi@pd95b104a.dip0.t-ipconnect.de) has joined #tryton
2010-12-01 07:02 -!- rednul_(~rednul@host-174-45-250-246.bln-mt.client.bresnan.net) has joined #tryton
2010-12-01 07:54 -!- trifon(~trifon@91-67-144-158-dynip.superkabel.de) has joined #tryton
2010-12-01 08:16 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2010-12-01 08:18 -!- trifon(~trifon@91-67-144-158-dynip.superkabel.de) has joined #tryton
2010-12-01 08:27 -!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton
2010-12-01 09:01 -!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton
2010-12-01 09:13 -!- lem0na(~lem0na@84.40.71.19) has joined #tryton
2010-12-01 09:27 -!- lem0na(~lem0na@84.40.71.19) has joined #tryton
2010-12-01 09:33 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2010-12-01 09:35 -!- pjstevns(~pjstevns@helpoort.xs4all.nl) has joined #tryton
2010-12-01 09:38 -!- bechamel(~user@cismwks02-virtual1.cism.ucl.ac.be) has joined #tryton
2010-12-01 09:45 -!- GasbaKid(~GasbaKid@41.96.40.183) has joined #tryton
2010-12-01 10:34 -!- vincentvdl(~vincent@62.58.29.41) has joined #tryton
2010-12-01 10:37 -!- vincentvdl(~vincent@62.58.29.41) has left #tryton
2010-12-01 10:37 -!- vincentvdl(~vincent@62.58.29.41) has joined #tryton
2010-12-01 11:27 -!- GasbaKid(~GasbaKid@41.96.40.183) has joined #tryton
2010-12-01 11:40 -!- ikks(~ikks@190.158.122.179) has joined #tryton
2010-12-01 12:32 -!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton
2010-12-01 12:53 -!- lem0na(~lem0na@84.40.71.19) has joined #tryton
2010-12-01 13:06 -!- vincentvdl(~vincent@62.58.29.41) has joined #tryton
2010-12-01 15:04 -!- gremly(~gremly@200.106.202.91) has joined #tryton
2010-12-01 15:45 -!- trifon(~trifon@p4FFB8893.dip0.t-ipconnect.de) has joined #tryton
2010-12-01 15:58 -!- pepeu(~manuel@201.155.193.192) has joined #tryton
2010-12-01 16:40 -!- enlightx(~enlightx@static-217-133-61-144.clienti.tiscali.it) has joined #tryton
2010-12-01 17:06 -!- GasbaKid(~GasbaKid@41.96.112.70) has joined #tryton
2010-12-01 17:16 -!- vladimir_(~vladimir@213.151.246.136) has joined #tryton
2010-12-01 17:36 -!- irclog(~irclog@tycho.b2ck.com) has joined #tryton
2010-12-01 18:05 -!- vincentvdl(~vincent@62.58.29.41) has left #tryton
2010-12-01 18:10 -!- paepke(~paepke@p4FEB1F44.dip0.t-ipconnect.de) has joined #tryton
2010-12-01 18:47 -!- paepke(~paepke@p4FEB0434.dip0.t-ipconnect.de) has joined #tryton
2010-12-01 19:02 -!- cedk(~ced@gentoo/developer/cedk) has joined #tryton
2010-12-01 19:08 -!- zvart(9f797202@gateway/web/freenode/ip.159.121.114.2) has joined #tryton
2010-12-01 19:14 -!- zvart(9f797202@gateway/web/freenode/ip.159.121.114.2) has left #tryton
2010-12-01 19:27 <plantian> In order to use hgnested with hg I need to have the extension set in some hgrc file right ?
2010-12-01 19:34 -!- pjstevns(~pjstevns@helpoort.xs4all.nl) has joined #tryton
2010-12-01 19:54 <plantian> I figured it out, needed to put extension in home hgrc and downgrade mercurial.
2010-12-01 19:57 -!- trifon(~trifon@91-67-144-158-dynip.superkabel.de) has joined #tryton
2010-12-01 20:06 -!- chrue(~chrue@host-091-097-034-094.ewe-ip-backbone.de) has joined #tryton
2010-12-01 20:24 -!- enlightx(~enlightx@dynamic-adsl-94-34-210-185.clienti.tiscali.it) has joined #tryton
2010-12-01 21:02 -!- vladimir_(~vladimir@213.151.246.136) has joined #tryton
2010-12-01 21:04 <plantian> Is the Transaction part of 1.6 or 1.8 ?
2010-12-01 21:28 <cedk> plantian: 1.8
2010-12-01 21:31 <plantian> Cool thanks. The last python example seems like it should be locals().get('context', {}).get('company', 0). http://doc.tryton.org/1.6/trytond/doc/topics/pyson.html
2010-12-01 21:32 <cedk> plantian: if context is in locals then you can get it directly
2010-12-01 21:33 <plantian> if it is not though the statement will return False instead of 0 like it should
2010-12-01 21:33 <plantian> where 0 is the default of the second get
2010-12-01 21:34 <cedk> plantian: yes
2010-12-01 21:36 <cedk> plantian: fixed
2010-12-01 21:37 <plantian> Are python tuples/lists/dictionaries allowed such as -- PYSON, such as In(Eval('state'), ('A', 'B', 'C')) ? Seems like it should be fine.
2010-12-01 21:38 <cedk> plantian: only dict or list
2010-12-01 21:38 <plantian> Okay, maybe there should be a note about that? I was going to use tuple.
2010-12-01 21:39 <plantian> Also if Eval('state') is used but state is not defined what happens?
2010-12-01 21:40 <cedk> plantian: it will be the default value of Eval
2010-12-01 21:41 <cedk> plantian: if you use tuple you will have an exception that will be raised
2010-12-01 21:42 <plantian> Weird, Eval has a default... default ?
2010-12-01 21:42 <cedk> plantian: yes it is ''
2010-12-01 21:43 <plantian> If only I was here when that was decided. That's what I get for relaxing my involvement in the mailing list I guess.
2010-12-01 21:43 <plantian> I think it should be an error if no default is provided.
2010-12-01 21:43 <cedk> plantian: I don't see why
2010-12-01 21:45 <plantian> It makes debugging difficult when typos are made or unexpected conditions are met. Php and JavaScript both suffer from that issue.
2010-12-01 21:46 <cedk> plantian: there is cases where the field will not be there
2010-12-01 21:47 <plantian> Yes, in those cases the developer should expect it in advance and set an explicit default. That's just been a better approach in my experience but maybe you have had a different experience.
2010-12-01 21:48 <cedk> plantian: PYSON will be evaluated on the client, it should never fail
2010-12-01 21:52 <plantian> Cases where the eval target is missing should be handled with explicit defaults or proper defaults provided by the calling code I would think. I understand that it should never fail, but it doesn't help people if its not working correctly because of a typo but there is not way for a developer to know until readonly content has been updated over time which finally reveals the mistake.
2010-12-01 21:54 <cedk> plantian: we decided to never have exception in pyson evaluation because its usage is for GUI
2010-12-01 21:55 <cedk> plantian: and also we must know what is the expected type of value return by the eval for that we need to have a default value
2010-12-01 21:55 <plantian> Other programming failures cause error in gui though that lie in pure python, I don't understand why its different.
2010-12-01 21:56 <cedk> plantian: because it is a statement that can be evaluated in many environement so we can not assume that we will have everything
2010-12-01 21:56 <plantian> Having a default is fine, I meant having an implicit default I think is a bad idea. Maybe that wasn't clear.
2010-12-01 21:56 <plantian> Eval('state') --> '' (implicit) Eval('state', '') --> explicit
2010-12-01 21:56 <cedk> plantian: so I don't see the issue
2010-12-01 21:56 <plantian> oops I mean Eval('state') --> '' (implicit) Eval('state', '') --> '' (explicit)
2010-12-01 21:58 <cedk> plantian: having the default explicit doesn't help for typo
2010-12-01 21:59 <plantian> Yeah but since most of the time there will not be a default it will catch common programming errors.
2010-12-01 21:59 <plantian> If you don't think its a big deal then that's fine, you have more experience than I do, I was just pointing out a possible future problem.
2010-12-01 21:59 <cedk> plantian: most of the time the default will be ''
2010-12-01 22:00 <plantian> Are there cases where state is not defined ?
2010-12-01 22:00 <cedk> plantian: I never got this kind of issue for now
2010-12-01 22:00 <cedk> plantian: I don't know it is possible
2010-12-01 22:04 <plantian> Seems like it is impossible on most models since its a Selection field.
2010-12-01 22:05 <plantian> Anyways, it doesn't matter, thanks for help with PYSON, I have another question: Is this syntax correct, will the format be interpolated from xml before the pyson is evaluated? http://paste.pocoo.org/show/298665/
2010-12-01 22:06 <plantian> Actually nevermind, I think I can just get an example from the stock module.
2010-12-01 22:07 <cedk> plantian: looks good
2010-12-01 22:07 <plantian> I think I have extra quotes around %(stock.group_id)d though.
2010-12-01 22:08 <plantian> oh wait man
2010-12-01 22:08 <plantian> http://paste.pocoo.org/show/298672/
2010-12-01 22:08 <plantian> Was missing rest of example.
2010-12-01 22:13 <cedk> plantian: I don't understand why you put eval arround "%(stock.group_stock)d"
2010-12-01 22:14 <plantian> cedk: You are right. I don't think I need that.
2010-12-01 22:19 -!- GasbaKid(~GasbaKid@41.96.112.70) has joined #tryton
2010-12-01 22:30 <cedk> I got a patch to review for hgnested on mercurial 1.7 http://codereview.appspot.com/3381041

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!