This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author stestagg
Recipients Justin Hodder, eric.smith, stestagg
Date 2020-07-21.15:53:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1595346791.2.0.292409282592.issue41337@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-07-21 15:53:11stestaggsetrecipients: + stestagg, eric.smith, Justin Hodder
2020-07-21 15:53:11stestaggsetmessageid: <1595346791.2.0.292409282592.issue41337@roundup.psfhosted.org>
2020-07-21 15:53:11stestagglinkissue41337 messages
2020-07-21 15:53:10stestaggcreate