python 3 print()

Please support our Python advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved

Join Date: Sep 2008
Posts: 379
Reputation: tomtetlaw is an unknown quantity at this point 
Solved Threads: 4
tomtetlaw's Avatar
tomtetlaw tomtetlaw is offline Offline
Posting Whiz

python 3 print()

 
0
  #1
Jun 26th, 2009
  1. def prints(value, ..., seps='', ends='\n', files=sys.stdout):
  2. print(value, sep=seps, end=ends, file=files)
  3.  
  4. print = prints

Would this permently overwrite print or just overwrite it while my program is running?
...
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 4,045
Reputation: vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice vegaseat is just really nice 
Solved Threads: 934
Moderator
vegaseat's Avatar
vegaseat vegaseat is online now Online
DaniWeb's Hypocrite

Re: python 3 print()

 
0
  #2
Jun 26th, 2009
Only the program that has this code in it.
May 'the Google' be with you!
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 23
Reputation: funfullson is an unknown quantity at this point 
Solved Threads: 1
funfullson funfullson is offline Offline
Newbie Poster

Re: python 3 print()

 
0
  #3
Jun 28th, 2009
Sorry I think it will overwrite on print when its its callers prameters be like its own.or else print will call.
Is it true?
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 489
Reputation: shadwickman will become famous soon enough shadwickman will become famous soon enough 
Solved Threads: 76
shadwickman's Avatar
shadwickman shadwickman is offline Offline
Posting Pro in Training

Re: python 3 print()

 
0
  #4
Jun 29th, 2009
Originally Posted by funfullson View Post
Sorry I think it will overwrite on print when its its callers prameters be like its own.or else print will call.
Is it true?
I believe you're thinking of overloading a function, like in C++. Python doesn't have that capability.
"Two good old boys in a fire-apple red convertible. Stoned. Ripped. Twisted. Good people."
- Hunter S. Thompson

my photography
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC