Re: Unexpected behavior with replace_or_add from stdlib

2012-03-05 Thread Nick Anderson
On 03/05/2012 06:10 PM, Aleksey Tsalolikhin wrote: > On Mon, Mar 5, 2012 at 3:28 PM, Nick Anderson wrote: >> On 03/05/2012 04:33 PM, Daniel V. Klein wrote: >>> It is pretty hard to determine what you did wrong when you haven't shared >>> what you did... >> >> Well I included a gist link to the co

Re: Unexpected behavior with replace_or_add from stdlib

2012-03-05 Thread Aleksey Tsalolikhin
On Mon, Mar 5, 2012 at 3:28 PM, Nick Anderson wrote: > On 03/05/2012 04:33 PM, Daniel V. Klein wrote: >> It is pretty hard to determine what you did wrong when you haven't shared >> what you did... > > Well I included a gist link to the code. > > But Aleksey also commented that replace_or_add was

Re: Unexpected behavior with replace_or_add from stdlib

2012-03-05 Thread Nick Anderson
On 03/05/2012 04:33 PM, Daniel V. Klein wrote: > expected: > Bank Account: $3,987,245.22 > > Can you discover what did I do wrong? Also there is a subtle difference, this would be a desired unexpected outcome, compared to mine which was undesirable. :) -- Nick Anderson

Re: Unexpected behavior with replace_or_add from stdlib

2012-03-05 Thread Nick Anderson
On 03/05/2012 04:33 PM, Daniel V. Klein wrote: > It is pretty hard to determine what you did wrong when you haven't shared > what you did... Well I included a gist link to the code. But Aleksey also commented that replace_or_add wasn't included in it, so I have attached the example policy and in

Re: Unexpected behavior with replace_or_add from stdlib

2012-03-05 Thread Daniel V. Klein
It is pretty hard to determine what you did wrong when you haven't shared what you did... Humorously: before the job: Bank Account: $192.37 after the job: Bank Account: $193.42 expected: Bank Account: $3,987,245.22 Can you discover what did I do wrong? On Mar 5, 2012, at 4:37 PM, Nick Anders

Unexpected behavior with replace_or_add from stdlib

2012-03-05 Thread Nick Anderson
I am doing a replace or add on a string and I am getting unexpected results, namely the value isn't being replaced. https://gist.github.com/1981225 before the run $ cat /tmp/network HOSTNAME=node1.domain.com after the run $ cat /tmp/network HOSTNAME=node1.domain.com HOSTNAME=node1 NISDOMAIN=doma