PEP 0214 - extended print statement

Grant Griffin g2 at seebelow.org
Sat Aug 26 04:19:54 EDT 2000


Martijn Faassen wrote:
...
> Though I tend to handle this type of 'write to logfile' thing with a
> convenient log object like this:
> 
> class Log:
>     def __init__(self, f):
>         self.f = f
>     def __call__(self, line):
>         self.f.write(line)
>         self.f.write("\n")
> 
> mylog = Log(sys.stdout)
> mylog("foo!")
>
> If I need any automatic conversions to strings, I just use % with %s.

Good idea--thanks!

> Anyway, perhaps this change makes print more useful, but it sure looks
> ugly to me.

I'm relatively new to Python myself (maybe 6 months or so), but my "ugly
alarm" is going off about this whole nutty extended print statement,
too.

and-"beautiful-is-better-than-ugly"-for-a-reason-ly y'rs,

=g2
-- 
_____________________________________________________________________

Grant R. Griffin                                       g2 at dspguru.com
Publisher of dspGuru                           http://www.dspguru.com
Iowegian International Corporation	      http://www.iowegian.com



More information about the Python-list mailing list