Re: Another Sets Problem

2009-12-30 Thread Victor Subervi
On Tue, Dec 29, 2009 at 6:08 PM, Emile van Sebille wrote: > On 12/29/2009 12:52 PM Victor Subervi said... > >> On Tue, Dec 29, 2009 at 4:30 PM, Carsten Haese > > wrote: >>You need to rethink your priorities. Understanding your code is a >>prerequisite, not

Re: Another Sets Problem

2009-12-29 Thread Emile van Sebille
On 12/29/2009 12:52 PM Victor Subervi said... On Tue, Dec 29, 2009 at 4:30 PM, Carsten Haese mailto:carsten.ha...@gmail.com>> wrote: You need to rethink your priorities. Understanding your code is a prerequisite, not a luxury. You keep saying that you'll get around to understanding yo

Re: Another Sets Problem

2009-12-29 Thread Stefan Behnel
Victor Subervi wrote: I'm using python 2.4.3 which apparently requires that I import Set: from sets import Set ... unless you use "set" instead of "Set". I've done this. In another script I successfully manipulated MySQL sets by so doing. Here's the code snippet from the script where I was a

Re: Another Sets Problem

2009-12-29 Thread Victor Subervi
On Tue, Dec 29, 2009 at 4:30 PM, Carsten Haese wrote: > Victor Subervi wrote: > > On Tue, Dec 29, 2009 at 3:58 PM, Carsten Haese > > wrote: > > > > Victor Subervi wrote: > > > You know I did this before, substituting "f" for "field", and it > > honestly

Re: Another Sets Problem

2009-12-29 Thread Carsten Haese
Victor Subervi wrote: > On Tue, Dec 29, 2009 at 3:58 PM, Carsten Haese > wrote: > > Victor Subervi wrote: > > You know I did this before, substituting "f" for "field", and it > honestly wouldn't print but threw a 500 error. Now it works. I don't > u

Re: Another Sets Problem

2009-12-29 Thread Victor Subervi
On Tue, Dec 29, 2009 at 3:58 PM, Carsten Haese wrote: > Victor Subervi wrote: > > You know I did this before, substituting "f" for "field", and it honestly > wouldn't print but threw a 500 error. Now it works. I don't understand. > > That's exactly why you keep running into strange problems. I str

Re: Another Sets Problem

2009-12-29 Thread Carsten Haese
Victor Subervi wrote: > You know I did this before, substituting "f" for "field", and it honestly > wouldn't print but threw a 500 error. Now it works. I don't understand. That's exactly why you keep running into strange problems. I strongly urge you to learn to understand why your code does what

Re: Another Sets Problem

2009-12-29 Thread Victor Subervi
On Tue, Dec 29, 2009 at 1:14 PM, Carsten Haese wrote: > Victor Subervi wrote: > > On Tue, Dec 29, 2009 at 12:54 PM, Carsten Haese > > wrote: > > > > Victor Subervi wrote: > > > Since it is difficult to send the inputs but easy to provide the > > > outpu

Re: Another Sets Problem

2009-12-29 Thread Carsten Haese
Victor Subervi wrote: > On Tue, Dec 29, 2009 at 12:54 PM, Carsten Haese > wrote: > > Victor Subervi wrote: > > Since it is difficult to send the inputs but easy to provide the > > outputs, and as opposed to posting the printout, let me direct you >

Re: Another Sets Problem

2009-12-29 Thread Victor Subervi
On Tue, Dec 29, 2009 at 12:54 PM, Carsten Haese wrote: > Victor Subervi wrote: > > Since it is difficult to send the inputs but easy to provide the > > outputs, and as opposed to posting the printout, let me direct you here > > to see it first-hand: > > http://angrynates.com/cart/enterProducts2.py

Re: Another Sets Problem

2009-12-29 Thread Carsten Haese
Victor Subervi wrote: > Since it is difficult to send the inputs but easy to provide the > outputs, and as opposed to posting the printout, let me direct you here > to see it first-hand: > http://angrynates.com/cart/enterProducts2.py?store=products All right, I've gone to that URL. Now what? I see

Re: Another Sets Problem

2009-12-29 Thread Victor Subervi
On Tue, Dec 29, 2009 at 12:21 PM, MRAB wrote: > Victor Subervi wrote: > > On Tue, Dec 29, 2009 at 6:29 AM, Jean-Michel Pichavant < >> jeanmic...@sequans.com > wrote: >> >>Matt Nordhoff wrote: >> >>Victor Subervi wrote: >> >>On Mon, Dec 28, 2

Re: Another Sets Problem

2009-12-29 Thread Victor Subervi
On Tue, Dec 29, 2009 at 12:15 PM, Carsten Haese wrote: > Victor Subervi wrote: > > Once again, it seems nobody is bothering to address this issue. Is it > > beyond your reach as it is beyond mine? I feel compelled to restate the > > problem once again as I did in my original post, and to once agai

Re: Another Sets Problem

2009-12-29 Thread Steve Holden
Victor Subervi wrote: > On Tue, Dec 29, 2009 at 10:16 AM, Steve Holden > wrote: > > Victor Subervi wrote: > > On Tue, Dec 29, 2009 at 9:33 AM, Steve Holden > > >> wrot

Re: Another Sets Problem

2009-12-29 Thread Emile van Sebille
On 12/29/2009 5:51 AM Victor Subervi said... > # print 'XXX', types[x] > elif types[x][0:3] == 'set': > for f in field: > print 'AAA%s\n' % (field) > else: > print 'YYY'

Re: Another Sets Problem

2009-12-29 Thread MRAB
Victor Subervi wrote: On Tue, Dec 29, 2009 at 6:29 AM, Jean-Michel Pichavant mailto:jeanmic...@sequans.com>> wrote: Matt Nordhoff wrote: Victor Subervi wrote: On Mon, Dec 28, 2009 at 1:41 PM, MRAB mailto:pyt...@mrabarnett.plus.com>

Re: Another Sets Problem

2009-12-29 Thread Carsten Haese
Victor Subervi wrote: > Once again, it seems nobody is bothering to address this issue. Is it > beyond your reach as it is beyond mine? I feel compelled to restate the > problem once again as I did in my original post, and to once again post > the entire code. Hopefully someone will help me see my

Re: Another Sets Problem

2009-12-29 Thread MRAB
Victor Subervi wrote: On Mon, Dec 28, 2009 at 4:23 PM, Steve Holden > wrote: [snip] Boy, does it! It looks great...on paper. Here's some revised code to debug: # print 'XXX', types[x] elif types[x][0:3] == 'set': for f in

Re: Another Sets Problem

2009-12-29 Thread Victor Subervi
On Tue, Dec 29, 2009 at 10:16 AM, Steve Holden wrote: > Victor Subervi wrote: > > On Tue, Dec 29, 2009 at 9:33 AM, Steve Holden > > wrote: > > > > That's a bit like being told you have to produce something green, and > > then when you do, being told "no, not t

Re: Another Sets Problem

2009-12-29 Thread Steve Holden
Victor Subervi wrote: > On Tue, Dec 29, 2009 at 9:33 AM, Steve Holden > wrote: > > That's a bit like being told you have to produce something green, and > then when you do, being told "no, not that green, a light green". So you > produce something a lighter

Re: Another Sets Problem

2009-12-29 Thread Victor Subervi
On Tue, Dec 29, 2009 at 9:33 AM, Steve Holden wrote: > That's a bit like being told you have to produce something green, and > then when you do, being told "no, not that green, a light green". So you > produce something a lighter gree and then being told "no, a slightly > redder green". And so on

Re: Another Sets Problem

2009-12-29 Thread Steve Holden
Victor Subervi wrote: > On Mon, Dec 28, 2009 at 4:23 PM, Steve Holden > wrote: > > There is only one way for the piece of code you quote to print nothing > (unless you suspect a bug in the Python interpreter, but the probability > of that is so low compared

Re: Another Sets Problem

2009-12-29 Thread Victor Subervi
On Tue, Dec 29, 2009 at 6:29 AM, Jean-Michel Pichavant < jeanmic...@sequans.com> wrote: > Matt Nordhoff wrote: > >> Victor Subervi wrote: >> >> >>> On Mon, Dec 28, 2009 at 1:41 PM, MRAB >> > wrote: >>> >>> DON'T USE BARE EXCEPTS! (There are 2 in yo

Re: Another Sets Problem

2009-12-29 Thread Jean-Michel Pichavant
Matt Nordhoff wrote: Victor Subervi wrote: On Mon, Dec 28, 2009 at 1:41 PM, MRAB mailto:pyt...@mrabarnett.plus.com>> wrote: DON'T USE BARE EXCEPTS! (There are 2 in your code.) There are times when they are *necessary*. No, there aren't. Even if there were, this is not o

Re: Another Sets Problem

2009-12-29 Thread Victor Subervi
On Mon, Dec 28, 2009 at 4:23 PM, Steve Holden wrote: > There is only one way for the piece of code you quote to print nothing > (unless you suspect a bug in the Python interpreter, but the probability > of that is so low compared with the probability of your making a mistake > in interpretation o

Re: Another Sets Problem

2009-12-28 Thread Steve Holden
Victor Subervi wrote: > On Mon, Dec 28, 2009 at 3:07 PM, Steve Holden > However, when I try that in my current script, the script > > fails. It throws no error, but rather just quits printing > to the > > screen. Here's the code snippet: > > > >

Re: Another Sets Problem

2009-12-28 Thread Victor Subervi
On Mon, Dec 28, 2009 at 3:07 PM, Steve Holden wrote: > Victor Subervi wrote: > > On Mon, Dec 28, 2009 at 1:41 PM, MRAB > > wrote: > > > > Victor Subervi wrote: > > > > Hi; > > I'm using python 2.4.3 which apparently requires that I import >

Re: Another Sets Problem

2009-12-28 Thread Steve Holden
Victor Subervi wrote: > On Mon, Dec 28, 2009 at 1:41 PM, MRAB > wrote: > > Victor Subervi wrote: > > Hi; > I'm using python 2.4.3 which apparently requires that I import Set: > from sets import Set > I've done this. In anothe

Re: Another Sets Problem

2009-12-28 Thread Matt Nordhoff
Victor Subervi wrote: > On Mon, Dec 28, 2009 at 1:41 PM, MRAB > wrote: >> DON'T USE BARE EXCEPTS! >> >> (There are 2 in your code.) > > There are times when they are *necessary*. No, there aren't. Even if there were, this is not one of those situations. -- M

Re: Another Sets Problem

2009-12-28 Thread Victor Subervi
On Mon, Dec 28, 2009 at 1:41 PM, MRAB wrote: > Victor Subervi wrote: > >> Hi; >> I'm using python 2.4.3 which apparently requires that I import Set: >> from sets import Set >> I've done this. In another script I successfully manipulated MySQL sets by >> so doing. Here's the code snippet from the

Re: Another Sets Problem

2009-12-28 Thread MRAB
Victor Subervi wrote: Hi; I'm using python 2.4.3 which apparently requires that I import Set: from sets import Set I've done this. In another script I successfully manipulated MySQL sets by so doing. Here's the code snippet from the script where I was able to call the elements in a for loop:

Another Sets Problem

2009-12-28 Thread Victor Subervi
Hi; I'm using python 2.4.3 which apparently requires that I import Set: from sets import Set I've done this. In another script I successfully manipulated MySQL sets by so doing. Here's the code snippet from the script where I was able to call the elements in a for loop: if isinstance(col