Printing a drop down menu for a specific field.

Dave Angel davea at davea.name
Sun Oct 27 07:52:32 EDT 2013


On 27/10/2013 03:31, Nick the Gr33k wrote:

> Στις 27/10/2013 6:00 πμ, ο/η rurpy at yahoo.com έγραψε:

     <snip>
>
> I read it thoroughly and tested it and it works as it should.
>
> I just wanted to mention that the definition of the function coalesce() 
> must come prior of:
>
>>          newdata = coalesce( data )
>>          for row in newdata:
>
> because function must be defined first before we try to call it and pass 
> data to ti, so i placed it just before that.
>

I found the above two lines in the function main(), in Rurpy's code.  If
that's where you were talking about, the comment about order does not
apply.

If you are calling from one function into another (in this case from
main() into coalesce()), and the two functions are defined at global
scope, then the functions may be appear in either order.

it's only when you're calling a function from global scope, or sometimes
when nesting functions inside each other, that order of
definition of the two functions matters.  Naturally, the call to main()
from top-level has to be after both functions are defined.

-- 
DaveA





More information about the Python-list mailing list