tqchen commented on PR #454:
URL: https://github.com/apache/tvm-ffi/pull/454#issuecomment-3908360989

   Looks like great improvement, would be good to discuss a bit how are we 
thinking in terms of repr printing and behavior against python repr. The repr 
do not exactly need round trippable(serialization perhaps is a better choice 
there). So there is a question whether we want to have the duplicated value 
printing (or as an option), and whether it should be default.
   
   The default behavior of python atm is simply expand. Expansion also could 
make sense for cases like immutable data structure. Say a shape value get 
reference in multiple places beause of the way we copy the data structure
   
   ```python
   x = (1,2,3)
   y = (1,4)
   
   print([y, y])
   > [(1,4), (1,4)]
   
   # circle case
   x = [12]
   x.append(x)
   > [12, [...]]
   ``` 
   
   This being said, there can be value in cases where we might want duplicated 
value printing. Perhaps we can do it under a flag.
   
   
   
   
   
   
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to