Steve Stagg <stest...@gmail.com> added the comment:
This appears to be a bug with the google colab site. For whatever reason, if you try to evaluate a statement that is a line with a leading comma (afaik, never valid python), then colab does something wierd by wrapping the arguments in quotes, and evaluating them ... Here, `>>>` denotes running python in a colab cell: >>> type(1) int >>> ,type(1) str >>> ,type(1,2,3) str >>> ,type(1, 2, 3) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-38-a1b277d7db3e> in <module>() ----> 1 type("(1,", "2,", "3)") TypeError: type.__new__() argument 2 must be tuple, not str --- This is not reproducible in normal python, so seems extremely likely to be some (planned or unplanned) feature of google colab that's causing confusion here. ---------- nosy: +stestagg status: pending -> open _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41337> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com