@@ -265,22 +265,40 @@ def __hash__(self):
265
265
266
266
@property
267
267
def name (self ):
268
+ """
269
+ Name of the Step object (B', R, U2)
270
+ """
268
271
return self .__name ()
269
272
270
273
@property
271
274
def is_counter_clockwise (self ):
275
+ """
276
+ True if direction is counter-clockwise (not including 180 degrees)
277
+ False otherwise
278
+ """
272
279
return self .__is_counter_clockwise ()
273
280
274
281
@property
275
282
def is_clockwise (self ):
283
+ """
284
+ True if direction is clockwise (not including 180 degrees)
285
+ False otherwise
286
+ """
276
287
return self .__is_clockwise ()
277
288
278
289
@property
279
290
def is_180 (self ):
291
+ """
292
+ True if the action is to turn 180 degrees
293
+ False otherwise
294
+ """
280
295
return self .__is_180 ()
281
296
282
297
@property
283
298
def face (self ):
299
+ """
300
+ Face of the step (R, U, l, x, M)
301
+ """
284
302
return self .__face ()
285
303
286
304
@@ -367,9 +385,10 @@ def __getitem__(self, index):
367
385
>>> a[1]
368
386
U
369
387
"""
388
+ result = super (Formula , self ).__getitem__ (index )
370
389
if isinstance (index , slice ):
371
- return Formula (list . __getitem__ ( self , index ) )
372
- return list . __getitem__ ( self , index )
390
+ return Formula (result )
391
+ return result
373
392
374
393
def __setitem__ (self , index , item ):
375
394
"""
@@ -387,9 +406,9 @@ def __setitem__(self, index, item):
387
406
del self [index ]
388
407
return
389
408
if isinstance (index , slice ):
390
- list . __setitem__ ( self , index , Formula (item ))
409
+ super ( Formula , self ). __setitem__ ( index , Formula (item ))
391
410
else :
392
- list . __setitem__ ( self , index , Step (item ))
411
+ super ( Formula , self ). __setitem__ ( index , Step (item ))
393
412
394
413
def __setattr__ (self , name , value ):
395
414
"""
0 commit comments