Comments
This commit is contained in:
@@ -70,6 +70,10 @@ class Deferred(Node):
|
||||
return res
|
||||
|
||||
def copy(self):
|
||||
""" Returns self (used when Block objects are copyd)
|
||||
returns:
|
||||
self
|
||||
"""
|
||||
return self
|
||||
|
||||
|
||||
|
||||
@@ -108,9 +108,13 @@ class Identifier(Node):
|
||||
return '%'.join('%'.join(p) for p in self.parsed).strip().strip('%')
|
||||
|
||||
def copy(self):
|
||||
""" Return copy of self
|
||||
Returns:
|
||||
Identifier object
|
||||
"""
|
||||
"""
|
||||
tokens = [t for t in self.tokens] if type(self.tokens) is list else self.tokens
|
||||
tokens = ([t for t in self.tokens]
|
||||
if type(self.tokens) is list
|
||||
else self.tokens)
|
||||
return Identifier(tokens, 0)
|
||||
|
||||
|
||||
|
||||
@@ -86,7 +86,9 @@ class Property(Node):
|
||||
return f % fills
|
||||
|
||||
def copy(self):
|
||||
"""
|
||||
""" Return a full copy of self
|
||||
Returns:
|
||||
Property object
|
||||
"""
|
||||
return Property([t for t in self.tokens], 0)
|
||||
new.property = self.property
|
||||
|
||||
@@ -27,6 +27,10 @@ class Variable(Node):
|
||||
scope.add_variable(self)
|
||||
|
||||
def copy(self):
|
||||
""" Return a copy of self
|
||||
Returns:
|
||||
Variable object
|
||||
"""
|
||||
return Variable([t for t in self.tokens])
|
||||
|
||||
def fmt(self, fills):
|
||||
|
||||
Reference in New Issue
Block a user