Re: [Python-Dev] Switch statement - handling errors

2006-06-27 Thread Guido van Rossum
On 6/27/06, Jim Jewett <[EMAIL PROTECTED]> wrote: > Bad Case Option (5) -- ad hoc mixture > - > > Pick an arbitrary set of rules, and follow it. > > Guido is currently leaning towards this, with the rules being "freeze > at definition", raise for unhashable, igno

Re: [Python-Dev] Switch statement - handling errors

2006-06-27 Thread Ka-Ping Yee
On Tue, 27 Jun 2006, Jim Jewett wrote: > (Almost) everyone agrees that the case expressions SHOULD be run-time > constants. The disagreements are largely over what to do when this > gets violated. I like your summary and understood most of it (options 1, 2, 3, 5, 6). The only part i didn't unders

Re: [Python-Dev] Switch statement - handling errors

2006-06-27 Thread Guido van Rossum
On 6/27/06, Jim Jewett <[EMAIL PROTECTED]> wrote: > On 6/26/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > I like Python's rules to be simple, and I > > prefer to occasionally close off a potential optimization path in the > > sake of simplicity. > > (Almost) everyone agrees that the case expr

Re: [Python-Dev] Switch statement - handling errors

2006-06-27 Thread Jim Jewett
On 6/26/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > I like Python's rules to be simple, and I > prefer to occasionally close off a potential optimization path in the > sake of simplicity. (Almost) everyone agrees that the case expressions SHOULD be run-time constants. The disagreements are