On Fri, Feb 10, 2017 at 7:50 PM, Zachary Ware
<zachary.ware+py...@gmail.com> wrote:

> Try `help(repr)` and `int` on its own at the interactive prompt, and

py3: help(repr)
Help on built-in function repr in module builtins:

repr(obj, /)
    Return the canonical string representation of the object.

    For many object types, including most builtins, eval(repr(obj)) == obj.

Question:  What does the forward slash represent in this context?  If I type:

py3: repr(int, /)
  File "<stdin>", line 1
    repr(int, /)
              ^
SyntaxError: invalid syntax

whereas:

py3: repr(int)
"<class 'int'>"

appears to be correct.

-- 
boB
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to