![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 434
Rep Power: 4
![]() |
So we are tripping up over "use it" and "call it". When one function calls another function then it becomes "use it". That makes Python a lot clearer to a beginner like me!
I tested it, and it is okay.
__________________
I looked it up on the Intergnats! |
|
|
|
|
|
#12 | |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Quote:
|
|
|
|
|
|
|
#13 |
|
Professional Programmer
Join Date: Feb 2005
Posts: 434
Rep Power: 4
![]() |
Sorry,
I fixed something that wasn't broken. My mistake! By the time main() is called everything is referenced properly. I agree, globals are a poor choice. Maybe they have a place in short, quick and dirty code.
__________________
I looked it up on the Intergnats! |
|
|
|
|
|
#14 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
Similar confusion in the JS forum a while back. Referenced and invoked are two different things. Let me also cast my vote with these guys. There are reasons to use globals; they're thin on the ground. Try to avoid them if possible.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|