![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Newbie
|
why not just:
import sys
#some code
if foo == 'ja':
print 'stuff'
sys.exit(0)
#some more codeor even better yet, put it all in a function: def main():
(your code)
if var == 'ja':
print 'stuff'
return
(more code)
if __name__ == '__main__': main()
__________________
now go away or I shall taunt you a second time :D |
|
|
|
|
|
#12 |
|
Professional Programmer
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4
![]() |
Because breaking flow is less consistent and requires fractionally more thinking. Seeing "if...else" == flow, and flow == good.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|