Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Fatal Python error: unknown scope for...

Reply
Thread Tools

Fatal Python error: unknown scope for...

 
 
=?iso-8859-2?Q?Marek_=22Baczek=22_Baczy=F1ski?=
Guest
Posts: n/a
 
      08-05-2003
:map ,p :!python % <cr>
,p
#v+
C:\COMMAND.COM /c python items.py
Fatal Python error: unknown scope for super in __init__(14) in items.py
symbols: {'multirandrange': 264}
locals: {}
globals: {'multirandrange': True}


abnormal program termination
Hit any key to close this window...
#v-
(also have mp for PyChecker, which failed miserably with the same message)

I must have done something *really* bad, I said to myself. Yet IMHO I
didn't (just paste'n'run):

class Weapon(Item):
def __init__(self, name, category, rarity=COMMON, weight,
damdie = (1,6), tdamdie=(1,4), material=None, effects = (),
todam_f = lambda: multirandrange(-1,2,3)):
super(Weapon, self).__init__(name, weight, damdie, tdamdie, rarity,
material, effects, todam_f=todam_f)
self.category = category

Apparently, removing todam_f fixes the FPE, as well as making the code
syntactically correct (moving rarity after weight.) Seems like something
got overlooked in the parser?

Almost forgot: Python 2.3/win98

Pozdrawiam, Baczek
 
Reply With Quote
 
 
 
 
=?iso-8859-2?Q?Marek_=22Baczek=22_Baczy=F1ski?=
Guest
Posts: n/a
 
      08-06-2003
On Wed, 06 Aug 2003 12:53:15 +1000, Mark Hammond wrote:

>> def g(a=None, b, c=lambda: None): g
>> """Fatal Python error: unknown scope for g in g(1) in marek.py"""

>
> Yep, I still get this with current CVS Python. You should open a bug.


Done.

Pozdrawiam, Baczek
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bug in python [was: Fatal Python error: ceval: tstate mix-up] Laszlo Nagy Python 0 01-12-2009 08:51 AM
Fatal Python error using ctypes & python exceptions mmacrobert Python 1 08-31-2007 03:55 PM
Assign an unknown value to an unknown variable Vincent Arnoux Ruby 1 08-11-2006 06:12 PM
c1xxast : fatal error C1048: unknown option 'L' in '-ZILP448' Chris Kushnir Windows 64bit 1 03-19-2006 10:16 AM
Fatal Python error with Py_InitModule (Python 2.3) Andrew Ellem Python 1 08-27-2003 03:42 PM



Advertisments