Language mavens: Is there a programming with "if then else ENDIF" syntax?

Steve Howell showell30 at yahoo.com
Wed Nov 18 18:58:24 EST 2009


On Nov 18, 2:22 pm, Steven D'Aprano
<ste... at REMOVE.THIS.cybersource.com.au> wrote:
> On Wed, 18 Nov 2009 02:06:49 -0800, Steve Howell wrote:
> > P.S. The underscores before the method names might look a little funny
> > for inner methods, but it's the nature of the code..._dict and _list
> > would lead to confusion with builtins, if not actual conflict.
>
> Then name them something sensible that tells what they do!
>
> The convention (which you break at your peril) is that functions are
> verbs, and classes are nouns. Even "handle_dict" is better than _dict --
> the latter looks like you're calling a private mapping type.
>

Do you verbify functions with no side effects?  Do you prefer
calculate_cosine(angle) to cosine(angle)?



More information about the Python-list mailing list