2008/10/2 mengkuan <[EMAIL PROTECTED]>: > Thanks, I just tried that but the whitespaces are still there. It > seems that each "if" statement generates one newline even if it > evaluates to false.
Whitespaces are generated by \n inside if statements when if = true. try to see what returns if.discount inside shell, maybe the problem is there. http://www.java2s.com/Code/Python/Data-Type/WhatsTrueinPython.htm # 0 is false; all other numbers are true. # An empty string ("") is false, all other strings are true. # An empty list ([]) is false; all other lists are true. # An empty tuple (()) is false; all other tuples are true. # An empty dictionary ({}) is false; all other dictionaries are true. -- Alessandro Ronchi Skype: aronchi http://www.alessandroronchi.net SOASI Soc.Coop. - www.soasi.com Sviluppo Software e Sistemi Open Source Sede: Via Poggiali 2/bis, 47100 Forlì (FC) Tel.: +39 0543 798985 - Fax: +39 0543 579928 Rispetta l'ambiente: se non ti è necessario, non stampare questa mail --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en -~----------~----~----~----~------~----~------~--~---
