Re: functions versus statements (from WIKI)
"Mark Hahn" <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <003b01c464a7$d5f75a10$0d01a8c0@MarkVaio> |
Paul Prescod wrote: > Print should be as function for the same reason printf is a function > in C. It has nothing to do with flow-control so why should it be a > statement? Also as a keyword it removes the possibility for any object > to have a "print" method (unless Prothon has contextual keywords: > Python doesn't). I'll buy that. > The simplest thing is probably just to have "print" defined as > > def print(*args, **kwargs): > debug(*args, **kwargs) > return None As always, you're the man. I'll put it on the to-do list. Your name choices suck though. :-) I'll call the debug version "dbgPrt". It doesn't have to be pretty. I myself would say "prt = dbgPrt" at the top of my code.