@@ -280,13 +280,6 @@ class Assign(PyccelAstNode):
280
280
In the semantic stage :
281
281
TypedAstNode with the same shape as the lhs.
282
282
283
- status : str, optional
284
- If lhs is not allocatable, then status is None.
285
- otherwise, status is {'allocated', 'unallocated'}.
286
-
287
- like : Variable, optional
288
- Contains the name of the variable from which the lhs will be cloned.
289
-
290
283
python_ast : ast.Ast
291
284
The ast object parsed by Python's ast module.
292
285
@@ -307,24 +300,20 @@ class Assign(PyccelAstNode):
307
300
>>> Assign(A[0,1], x)
308
301
IndexedElement(A, 0, 1) := x
309
302
"""
310
- __slots__ = ('_lhs' , '_rhs' , '_status' , '_like' )
303
+ __slots__ = ('_lhs' , '_rhs' )
311
304
_attribute_nodes = ('_lhs' , '_rhs' )
312
305
313
306
def __init__ (
314
307
self ,
315
308
lhs ,
316
309
rhs ,
317
- status = None ,
318
- like = None ,
319
310
* ,
320
311
python_ast = None
321
312
):
322
313
if isinstance (lhs , (tuple , list )):
323
314
lhs = PythonTuple (* lhs )
324
315
self ._lhs = lhs
325
316
self ._rhs = rhs
326
- self ._status = status
327
- self ._like = like
328
317
super ().__init__ ()
329
318
if python_ast is not None :
330
319
self .set_current_ast (python_ast )
@@ -343,20 +332,6 @@ def lhs(self):
343
332
def rhs (self ):
344
333
return self ._rhs
345
334
346
- # TODO : remove
347
-
348
- @property
349
- def expr (self ):
350
- return self .rhs
351
-
352
- @property
353
- def status (self ):
354
- return self ._status
355
-
356
- @property
357
- def like (self ):
358
- return self ._like
359
-
360
335
@property
361
336
def is_alias (self ):
362
337
"""Returns True if the assignment is an alias."""
@@ -804,12 +779,6 @@ class AugAssign(Assign):
804
779
rhs : TypedAstNode
805
780
Object representing the rhs of the expression.
806
781
807
- status : str, optional
808
- See Assign.
809
-
810
- like : TypedAstNode, optional
811
- See Assign.
812
-
813
782
python_ast : ast.AST
814
783
The AST node where the object appeared in the original code.
815
784
@@ -835,8 +804,6 @@ def __init__(
835
804
lhs ,
836
805
op ,
837
806
rhs ,
838
- status = None ,
839
- like = None ,
840
807
* ,
841
808
python_ast = None
842
809
):
@@ -846,7 +813,7 @@ def __init__(
846
813
847
814
self ._op = op
848
815
849
- super ().__init__ (lhs , rhs , status , like , python_ast = python_ast )
816
+ super ().__init__ (lhs , rhs , python_ast = python_ast )
850
817
851
818
def __repr__ (self ):
852
819
return f'{ self .lhs } { self .op } = { self .rhs } '
@@ -857,16 +824,21 @@ def op(self):
857
824
858
825
def to_basic_assign (self ):
859
826
"""
860
- Convert the AugAssign to an Assign
827
+ Convert the AugAssign to an Assign.
828
+
829
+ Convert the AugAssign to an Assign.
861
830
E.g. convert:
862
831
a += b
863
832
to:
864
833
a = a + b
834
+
835
+ Returns
836
+ -------
837
+ Assign
838
+ An assignment equivalent to the AugAssign.
865
839
"""
866
840
return Assign (self .lhs ,
867
- self ._accepted_operators [self ._op ](self .lhs , self .rhs ),
868
- status = self .status ,
869
- like = self .like )
841
+ self ._accepted_operators [self ._op ](self .lhs , self .rhs ))
870
842
871
843
872
844
class While (ScopedAstNode ):
0 commit comments