Ask Your Question
2

Why no help for print?

asked 2011-06-17 03:05:34 +0100

omoplata gravatar image

I wanted to find what the function print does, so I typed

print?

and pressed tab.

I get "No object 'print' currently defined.

Why is that?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2011-06-17 03:31:28 +0100

kcrisman gravatar image

This is probably because print is a built-in Python command and not an object, and somehow the notebook won't do anything with it. I'm not sure there is anything that can be done to fix this.

For the record, in the command line, we get this:

sage: print?
Type:       builtin_function_or_method
Base Class: <type 'builtin_function_or_method'>
String Form:    <built-in function print>
Namespace:  Python builtin
Docstring:
    print(value, ..., sep=' ', end='n', file=sys.stdout)

    Prints the values to a stream, or to sys.stdout by default. Optional
    keyword arguments: file: a file-like object (stream); defaults to the
    current sys.stdout. sep:  string inserted between values, default a
    space. end:  string appended after the last value, default a newline.
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-06-17 03:05:34 +0100

Seen: 476 times

Last updated: Jun 17 '11