Name od builtin functions: is there a rule ?? 
Author Message
 Name od builtin functions: is there a rule ??

I just finished reading the python docs. It seems to be a very nice
language, but what bothers me is that I'm unable to find any rule or
convention for the naming of the builtin fucntions. Is there a reason,
or have functions been added one after an other without care of having
a consistent naming convention? Even though it does not change the
functionalities or semantics of the language, it is a bit irritating.
Examples:
some functions have underscores between words (has_keys, or exc_traceback,
...),
some functions have no underscores between words (fetchcolor, expandtabs,
...)
some functions have no underscors but Uppercases for the beginning of
the words (GetPitch, Write, UDPCreate, ...)

Can someone explain ?

--
=========================================================================


 (   )   /  (     )  \   ) /  | Los Angeles, CA 90291 | 'Bok' on IRC    
  \ (   (    )   (    ) (_/   |------------------------------------------
   \_)   oooO0   0Oooo        | Hop, et Hop, et Hop, et dans le baba.    
=========================================================================



Sun, 05 Oct 1997 03:00:00 GMT  
 Name od builtin functions: is there a rule ??

  I'm having trouble getting freeze to give me a working executable. I've
written a simple network server in python which works fine while interpreted
but bombs after it's been compiled using freeze. Freeze will create all the
right files and compile the source without errors but once run, the executable
will bomb with:

Fatal Python error: __main__ not frozen
IOT trap

  I verified that my setup compiles and runs "Hello World" without problems.
Am I doing something wrong or does freeze not know how to handle everything
yet?

 -ray



Thu, 09 Oct 1997 03:00:00 GMT  
 Name od builtin functions: is there a rule ??

Quote:
> I just finished reading the python docs. It seems to be a very nice
> language, but what bothers me is that I'm unable to find any rule or
> convention for the naming of the builtin fucntions. Is there a reason,
> or have functions been added one after an other without care of having
> a consistent naming convention? Even though it does not change the

I'm no authority in this domain, but by seeing some of the source files, I
would say that yes, the modules have been written by different people.

Besides, I never saw any proposal for a naming convention in Python.

But I don't think that the functions in the modules have been added
separately. I might be wrong, but I believe that within a module, the names
follow more or less the same rule.

-- Eric Daniel

Disclaimer: the opinions stated above are not mine, but those of the evil
alien entity that is presently controlling my mind.



Thu, 09 Oct 1997 03:00:00 GMT  
 Name od builtin functions: is there a rule ??
Gilles:

Quote:
>> I just finished reading the python docs. It seems to be a very nice
>> language, but what bothers me is that I'm unable to find any rule or
>> convention for the naming of the builtin fucntions. Is there a reason,
>> or have functions been added one after an other without care of having
>> a consistent naming convention? Even though it does not change the

Eric:

Quote:
>I'm no authority in this domain, but by seeing some of the source files, I
>would say that yes, the modules have been written by different people.

>Besides, I never saw any proposal for a naming convention in Python.

>But I don't think that the functions in the modules have been added
>separately. I might be wrong, but I believe that within a module, the names
>follow more or less the same rule.

Thanks to Eric for explaining what has happened.  Python as a language,
like C, is simply not in a position to standardize naming conventions for
all modules -- even though within a module names are usually standardized.

Note that this applies to built-in modules as well as to modules written
in Python: different authors have different likings.  Also, in many cases,
built-in modules try to follow the conventions of the C library they
are interfacing to -- so the posix module defines functions like fork(),
exec() and chdir(), while the X11 module defines functions like
ManageChildren() and CreateWidget().  This makes it easier to correlate
the documentation for the C version of the library with the Python
interface.

I do try to follow certain conventions in my own code when there's no
underlying set of rules, but I've not always been consistent in the past,
and when I incorporate code written by someone else I generally don't
change its style.


URL: http://www.cwi.nl/~guido/



Fri, 10 Oct 1997 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Builtin methods versus Builtin Functions -- help!

2. Pickler that handles modules, functions, and builtin functions -- done

3. generic functions to redefine builtin functions - how ?

4. Name valid outside function, but error name inside function

5. Help for four function od NT250.lib

6. i am new to this how do you define a rule in a inference engine

7. DECIMAL Builtin Function

8. Regina vs IBM REXX: builtin functions

9. How to get the Callable of builtin functions

10. builtin functions

11. i need help on builtin function math

12. filterout() builtin function

 

 
Powered by phpBB® Forum Software