Parentheses (as after "print")

Chris Angelico rosuav at gmail.com
Tue Sep 26 15:25:20 EDT 2017


On Wed, Sep 27, 2017 at 5:19 AM, Stefan Behnel <stefan_ml at behnel.de> wrote:
> print() and help() are definitely not worth being keywords. They do not
> impact the program flow, they don't do any assignments, nothing. That's why
> they are simple functions.

If anything, help() could benefit more from language support than
print() can. (And ipython/jupyter proves this - it has some other
features in this same area.) For instance, help(def) doesn't work, but
help("def") does. And help(id) could tell you if you're shadowing the
builtin with your own global name, which a function can't do. But
those aren't language features - they're interactive interpreter
features, which is why ipython is the place to add the functionality.

ChrisA



More information about the Python-list mailing list