easy question, how to double a variable

David C Ullrich dullrich at sprynet.com
Wed Sep 23 20:36:44 CEST 2009

On Tue, 22 Sep 2009 02:34:53 +0000, Steven D'Aprano wrote:

> On Mon, 21 Sep 2009 13:50:23 -0500, David C Ullrich wrote:
>> But you actually want to return twice the value. I don't see how to do
>> that.
> What?
> Seriously? 

You're saying it _can_ be done in Python? They must have added
something to the standard library again. I mean how can you return
twice a value without a twice function to start with? I've tried.
You'd think

def twice(n):
  return twice(n)

would work, but I get this really long error message.

> You're not just yanking the OP's chain???

That would be cruel. I mean the guy has enough problems already...

More information about the Python-list mailing list