*Minor* python usability proposal

Terry Reedy tjreedy at udel.edu
Wed Feb 12 22:17:03 CET 2003

"Eron Lloyd" <elloyd at lancaster.lib.pa.us> wrote in message
news:mailman.1045063972.2755.python-list at python.org...
> One nit I've sort of had was the syntax for declaring functions and
> The keyword "def" seems to me to be anti-intuitive compared to other
> declarative keywords, such as "class" (which is more descriptive).

It is an abbreviation for 'def_ine' or better, 'de_fine f_unction'.

> would like to ask the Python community is whether a more explicit
naming of
> "function" for global function definitions and "method" for class
> definitions would be desirable enough to implement.

'Function' might have been better, but 8 letters is too many for a
commonly used keyword, so it would have been abbreviated 'fun' (cute,
actually) or 'func'.

Method is not needed since methods are functions wrapped as methods.
This is a technical detail you should probably ignore for awhile.

> If the interest is there, I am more than willing to produce a PEP.

There isn't, and please don't.  It would only waste your time and that
of the PEPmasters.    Adding keywords happens rarely.  Changing
keywords never.

Terry J. Reedy

More information about the Python-list mailing list