On 1/02/23 7:33 am, Stefan Ram wrote:
Thomas Passin <li...@tompassin.net> writes:

   Some people say it is a function now so that you can redefine it.

Well, that's one benefit, but I wouldn't say it's the main one.

The point is really that you can do *anything* with it now that
you can do with a regular function -- pass it as an argument,
wrap it with another function, define your own function with a
similar signature for duck-typing purposes, etc.

   It would still be possible to have a special syntax for the outermost
   expression of an expression statement that would allow one to omit
   the parentheses,

That's only one of the syntactic oddities of the old print
statement, thogh. There was also the >> thing, special treatment
of trailing commas, etc.

Also, introducing a paren-less call syntax would be a very big
and controversial change that would be way out of proportion to
the problem.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to