[Tutor] Can I use def without ( ) at the end?

Nathan Pinno falcon3166 at hotmail.com
Sun Jul 10 02:36:14 CEST 2005


  Also, I just wanted to know because I'm using it in my Giant Computer 
program for the menus, so I don't have to keep re-typing them.

  Nathan Pinno
  ----- Original Message ----- 
  From: "Brian van den Broek" <bvande at po-box.mcgill.ca>
  To: "Nathan Pinno" <falcon3166 at hotmail.com>
  Cc: <tutor at python.org>
  Sent: Saturday, July 09, 2005 6:15 PM
  Subject: Re: [Tutor] Can I use def without ( ) at the end?


  > Nathan Pinno said unto the world upon 09/07/2005 19:03:
  >> Hi all,
  >>
  >> Is the subject possible without getting an error?
  >>
  >> Nathan Pinno
  >> Crew, McDonalds Restaurant, Camrose, AB Canada
  >> http://www.npinnowebsite.ca/
  >
  > No. Why do you want to do this? If it is to have a function with no
  > arguments:
  >
  > >>> def no_args():
  > ... print "I've no arguments"
  > ...
  > >>> no_args()
  > I've no arguments
  > >>>
  >
  > Brian vdB
  >
  >


More information about the Tutor mailing list