Newbie: OverflowError: integer addition - Python data types??

Aahz Maruch aahz at netcom.com
Thu Feb 3 09:58:17 EST 2000


In article <38986D0C.9C19D1F at callware.com>,
Ivan Van Laningham  <ivanlan at callware.com> wrote:
>
>2)  Defining a function Fibonacci() which uses a local variable inside
>itself name Fibonacci is terrible practice.  It's confusing and obscures
>your meaning.  When people read the function, every time they see the
>name of a function inside the function, they're *first* going to think
>"Recursion!"  They have to go back and re-read it before they realize
>it's only a variable having local scope.  Also, in such a short function
>there is no need to be so verbose, either; try renaming the Fibonacci
>variable to f.  I think you'll find it's much clearer.

I disagree to a certain extent with your last point; I think naming the
variable "fib" is a lot clearer than "f".  I have an extremely strong
dislike for one- and two-character names unless they're being used
strictly as loop variables.
--
                      --- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

Have a *HAPPY* day!!!!!!!!!!



More information about the Python-list mailing list