Any python function by default return None in your gimmetaste function you are not returning any value. That's why gimmetaste returns None
-----Original Message----- From: bangpypers-bounces+sibtey.mehndi=genpact....@python.org [mailto:bangpypers-bounces+sibtey.mehndi=genpact....@python.org] On Behalf Of Abhishek Mishra Sent: Thursday, September 03, 2009 7:27 PM To: bangpypers@python.org Subject: [BangPypers] Why the None ? Hi, I'm trying to pass 5 as default value for this function... ------------------------------------------------ def gimmetaste(length=5): print length if __name__ == '__main__': print gimmetaste() ------------------------------------------------ Output - 5 None I wonder why I get a None in the output? _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers This e-mail (and any attachments), is confidential and may be privileged. It may be read, copied and used only by intended recipients. Unauthorized access to this e-mail (or attachments) and disclosure or copying of its contents or any action taken in reliance on it is unlawful. Unintended recipients must notify the sender immediately by e-mail/phone & delete it from their system without making any copies or disclosing it to a third person. _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers