[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: print does two things
- From: Rob Kendrick <lua-l@...>
- Date: Fri, 16 Jul 2004 12:54:17 +0100
On Fri, Jul 16, 2004 at 01:45:04PM +0200, Markus Huber wrote:
> The follwoing line does two things:
>
> myprint = print
>
> 1. does a real print
> 2. correct assignment of myprint
>
> so it works but it prints too! And this is not allowed in my
> circumstance. Thats why I would like to catch print.
Am I reading this correctly? You want to make a copy of the reference
to 'print', but doing "foo = print" calls the print function? I didn't
know it did this, and I can't test it here. If it does however, have
you considered using rawget() instead?
--
Rob Kendrick, Pepperfish Ltd. +44 (0)845 226 4146 www.pepperfish.net
PGP signed or encrypted mail welcome Key ID: 3651D17A