@@ -240,7 +240,9 @@ def __init__(self, **kwargs):
240
240
241
241
svg_class_dict = {}
242
242
243
- for class_name in filter (lambda name : name .endswith ("Widget" ), locals ()):
243
+ widget_class_names = list (filter (lambda name : name .endswith ("Widget" ), locals ()))
244
+
245
+ for class_name in widget_class_names :
244
246
245
247
this_module = sys .modules [__name__ ]
246
248
klass = getattr (this_module ,class_name )
@@ -280,7 +282,7 @@ def __init__(self, **kwargs):
280
282
281
283
282
284
# now define the trailets with the correct traitlet.Type
283
- for name ,default in traitlets_dict .iteritems ():
285
+ for name ,default in traitlets_dict .items ():
284
286
285
287
try :
286
288
default = float (default )
@@ -309,7 +311,7 @@ def __init__(self, **kwargs):
309
311
"fertile" : klass .fertile ,
310
312
"view_name" : class_name .replace ("Widget" ,"View" ),
311
313
"attributes" : klass .attributes ,
312
- "draggable" : klass .draggable } for class_name ,klass in svg_class_dict .iteritems () }
314
+ "draggable" : klass .draggable } for class_name ,klass in svg_class_dict .items () }
313
315
314
316
315
317
# set data in global scope
0 commit comments