Parentheses (as after "print")
Stephan Houben
stephanh42 at gmail.com.invalid
Tue Sep 26 15:26:45 EDT 2017
Op 2017-09-26, Stefan Ram schreef <ram at zedat.fu-berlin.de>:
> What happened? I woke up today in parens mood. So I typed:
>
> import( operator )
>
> Python told me that I should type:
>
> import operator
>
> . Fine, Python conditioned me to omit the parens.
> So now I was in noparens mood. So I typed:
>
> help operator
>
> . Oops!
The explanation is of course that `import` is a syntactic keyword
and `help` is an ordinary function.
But if you want to be lazy, you can use the `ipython` interpreter
(https://ipython.org) with the %autocall feature...
$ ipython
Python 3.6.2 (default, Aug 3 2017, 16:08:52)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.2.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]: %autocall
Automatic calling is: Smart
In [2]: help help
Help on _Helper in module _sitebuiltins object:
class _Helper(builtins.object)
<snip>
Stephan
More information about the Python-list
mailing list