Oleg Broytmann phd.pp.ru> writes:
>
> On Mon, Mar 17, 2008 at 06:35:46PM -0400, Alexander Belopolsky wrote:
> > class x:
> > pass
> > class y(x):
> > pass
> > try:
> > raise y
> > except y:
> > print "a"
> > except:
> > print "b"
> >
> > It prints 'b'.
>
>Python 2.2, 2.3, 2.4 and 2.5
On Mon, Mar 17, 2008 at 07:18:25PM -0400, Alexander Belopolsky wrote:
> I don't have my PowerBook here, but I am sure I've seen in on Mac OS
> too. Only new-style class behavior is problematic. The following
> code prints 'b' for me:
>
> __metaclass__ = type
Ah, yes - with this addition it
On Mon, Mar 17, 2008 at 6:49 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
..
> Really? Under which version exactly? On which platform? I cannot
> reproduce this with either 2.4, 2.5 or 2.6 on OS X.
Just retested in
Python 2.6a1+ (trunk:61449M, Mar 17 2008, 17:29:21)
[GCC 3.4.6 20060404 (Red
On Mon, Mar 17, 2008 at 06:35:46PM -0400, Alexander Belopolsky wrote:
> class x:
> pass
> class y(x):
> pass
> try:
> raise y
> except y:
> print "a"
> except:
> print "b"
>
> It prints 'b'.
Python 2.2, 2.3, 2.4 and 2.5 on Linux: prints 'a'.
Oleg.
--
Oleg Broytmannhttp:
On Mon, Mar 17, 2008 at 5:35 PM, Alexander Belopolsky
<[EMAIL PROTECTED]> wrote:
> While discussing issue2291, I presented the following argument:
>
> """
> Consider the following code:
>
> class x:
> pass
> class y(x):
> pass
> try:
> raise y
> except y:
> print "a"
> ex
While discussing issue2291, I presented the following argument:
"""
Consider the following code:
class x:
pass
class y(x):
pass
try:
raise y
except y:
print "a"
except:
print "b"
It prints 'b'. Now, suppose in preparation for 3.0 transition someone
adds "__metaclass__ = type" to the module