Re: Tuple Unpacking in raise

2005-06-20 Thread James Stroud
Thank you Steven and Konstantin, that clears things up. Sometimes I forget how incomplete my Python Essential Reference is. James On Monday 20 June 2005 05:40 pm, Steven Bethard wrote: > Well, it's not a bug, because that's what the documentation says it'll do: > > "The second object is used to

Re: Tuple Unpacking in raise

2005-06-20 Thread Konstantin Veretennicov
On 6/21/05, Steven Bethard <[EMAIL PROTECTED]> wrote: > James Stroud wrote: > P.S. If you insist on using the two argument version of raise, you can > do it like this: > > py> class E(Exception): > ... def __init__(self, atup): > ... Exception.__init__(self, "Error with %s-%s" % atup)

Re: Tuple Unpacking in raise

2005-06-20 Thread Konstantin Veretennicov
On 6/21/05, James Stroud <[EMAIL PROTECTED]> wrote: > Hello All, > > Is this a bug? No, it works as documented. You should've consulted language reference: http://docs.python.org/ref/raise.html - kv -- http://mail.python.org/mailman/listinfo/python-list

Re: Tuple Unpacking in raise

2005-06-20 Thread Steven Bethard
James Stroud wrote: > Hello All, > > Is this a bug? Why is this tuple getting unpacked by raise? Am I missing some > subtle logic? Why does print not work the same way as raise? Both are > statements. Why does raise need to be so special? > > py> sometup = 1,2 > py> print sometup > (1, 2) > py>

Tuple Unpacking in raise

2005-06-20 Thread James Stroud
Hello All, Is this a bug? Why is this tuple getting unpacked by raise? Am I missing some subtle logic? Why does print not work the same way as raise? Both are statements. Why does raise need to be so special? py> sometup = 1,2 py> print sometup (1, 2) py> print 1,2,3, sometup 1 2 3 (1, 2) py> c