Re: Iterating dictionary items + if statement results in problems

2013-04-15 Thread Dave Angel
On 04/15/2013 09:37 AM, Ombongi Moraa Fe wrote: Hello Team, Thanks for your input. |Possibly it's not matching because of your mistaken use of octal. Octal won't hurt for ints below 8, but you probably don't restrict it in the real code. For example, v = 030 will not match equal in the follo

Re: Iterating dictionary items + if statement results in problems

2013-04-15 Thread Ombongi Moraa Fe
Hello Team, Thanks for your input. |Possibly it's not matching because of your mistaken use of octal. Octal won't hurt for ints below 8, but you probably don't restrict it in the real code. For example, v = 030 will not match equal in the following: I've changed the key,value pairs in the dic

Re: Iterating dictionary items + if statement results in problems

2013-04-15 Thread Dave Angel
On 04/15/2013 06:50 AM, Ombongi Moraa Fe wrote: hello Team, I have this fairly simple script to iterate the dictionary items and check if the items match certain values; dictionary={'1234567890':001, '0987654321':002} for k, v in dictionary.iteritems(): . . #suds clie

RE: Iterating dictionary items + if statement results in problems

2013-04-15 Thread Peter Otten
Ombongi Moraa Fe wrote: > hello Team, > > I have this fairly simple script to iterate the dictionary items and check > if the items match certain values; > > dictionary={'1234567890':001, '0987654321':002} > for k, v in dictionary.iteritems(): > . > . #suds client statem

Re: Iterating dictionary items + if statement results in problems

2013-04-15 Thread Mark Lawrence
On 15/04/2013 11:50, Ombongi Moraa Fe wrote: hello Team, I have this fairly simple script to iterate the dictionary items and check if the items match certain values; dictionary={'1234567890':001, '0987654321':002} for k, v in dictionary.iteritems(): . . #suds client

RE: Iterating dictionary items + if statement results in problems

2013-04-15 Thread Ombongi Moraa Fe
hello Team, I have this fairly simple script to iterate the dictionary items and check if the items match certain values; dictionary={'1234567890':001, '0987654321':002} for k, v in dictionary.iteritems(): . . #suds client statements; if (k == '1234567890' and v