nested scopes oddity/BUG

Michael Hudson mwh at python.net
Sat Jun 9 03:48:57 CEST 2001


Robin Becker <robin at jessikat.fsnet.co.uk> writes:

> When I try to run this script
> #####################
> from __future__ import nested_scopes
> def gen(B):
>         class W(B):
>                 __base=B
>                 def __init__(self):
>                         B.__init__(self)
>         return W
> 
> class C:
>         def __init__(self):
>                 pass
> #####################
> 
> I get
> 
> Fatal Python error: non-string found in code slot
> 
> abnormal program termination
> 
> this with 2.1 on Win9x. It works fine and dandy if I remove the spurious
> __base=B

This is fixed in CVS.  I bumped into it writing very similar code a
couple of weeks back, and found it had already been mended...

2.1.1-here-we-come-ly y'rs
M.

-- 
  ARTHUR:  But which is probably incapable of drinking the coffee.
                    -- The Hitch-Hikers Guide to the Galaxy, Episode 6



More information about the Python-list mailing list