Re: [Tutor] improvement of if - else code

2009-06-04 Thread Steve Willoughby
On Thu, Jun 04, 2009 at 07:25:20PM +0200, Norman Khine wrote: > Hello, > Is there a better way to write this: Depends on what's cleaner and clearer for what you're doing, especially as the complexity of this code grows. For example, if the only difference is which method to call, one approach mi

Re: [Tutor] improvement of if - else code

2009-06-04 Thread Norman Khine
Thanks On Thu, Jun 4, 2009 at 7:34 PM, vince spicer wrote: > you could assign loop variable > >    @staticmethod >    def get_form(address=None, postcode=None, town=None, phone=None, > fax=None, >                 freephone=None, address_country=None, address_region=None, >                 address

Re: [Tutor] improvement of if - else code

2009-06-04 Thread vince spicer
you could assign loop variable @staticmethod def get_form(address=None, postcode=None, town=None, phone=None, fax=None, freephone=None, address_country=None, address_region=None, address_county=None, hotel=None): context = get_context() root = co

[Tutor] improvement of if - else code

2009-06-04 Thread Norman Khine
Hello, Is there a better way to write this: @staticmethod def get_form(address=None, postcode=None, town=None, phone=None, fax=None, freephone=None, address_country=None, address_region=None, address_county=None, hotel=None): context = get_context(