junrushao1994 commented on code in PR #12048:
URL: https://github.com/apache/tvm/pull/12048#discussion_r922648561
##########
python/tvm/script/printer/doc.py:
##########
@@ -29,12 +34,63 @@ class Doc(Object):
class ExprDoc(Object):
"""Base class of all expression Docs"""
+ def attr_access(self, attr: str) -> "AttrAccessDoc":
+ """
+ Create a doc that represents attribute access on self.
+
+ Parameters
+ ----------
+ attr : str
+ The attribute name to access
+
+ Returns
+ -------
+ doc : AttrAccessDoc
+ """
+ return _ffi_api.ExprDocAttr(self, attr) # type: ignore
+
+ def index_access(self, indices: List[Union["ExprDoc", "SliceDoc"]]) ->
"IndexDoc":
Review Comment:
ditto
```suggestion
def index(self, indices: List[Union["ExprDoc", "SliceDoc"]]) ->
"IndexDoc":
```
##########
python/tvm/script/printer/doc.py:
##########
@@ -29,12 +34,63 @@ class Doc(Object):
class ExprDoc(Object):
"""Base class of all expression Docs"""
+ def attr_access(self, attr: str) -> "AttrAccessDoc":
+ """
+ Create a doc that represents attribute access on self.
+
+ Parameters
+ ----------
+ attr : str
+ The attribute name to access
+
+ Returns
+ -------
+ doc : AttrAccessDoc
+ """
+ return _ffi_api.ExprDocAttr(self, attr) # type: ignore
+
+ def index_access(self, indices: List[Union["ExprDoc", "SliceDoc"]]) ->
"IndexDoc":
+ """
+ Create a doc that represents index access on self.
+
+ Parameters
+ ----------
+ indices : List[Union["ExprDoc", "SliceDoc"]]
+ The indices to access
+
+ Returns
+ -------
+ doc : IndexDoc
+ """
+ return _ffi_api.ExprDocIndex(self, indices) # type: ignore
+
+ def call_with(self, *args: Tuple["ExprDoc"], **kwargs: Dict[str,
"ExprDoc"]) -> "CallDoc":
Review Comment:
ditto
```suggestion
def call(self, *args: Tuple["ExprDoc"], **kwargs: Dict[str, "ExprDoc"])
-> "CallDoc":
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]