Hello,

Daniel Crespo wrote:
> Is there a built-in method for transforming (1,None,"Hello!") to
> 1,None,"Hello!"?

As others answered before, the two syntaxes build the same object, so 
there is no need to convert.

Except if you already have the tuple stored in a variable, and want to 
call a function with the tree arguments:
   args = (1,None,"Hello!")

   func(args)  # equivalent to   func((1,None,"Hello!"))
   func(*args) # equivalent to   func(1,None,"Hello!")

Note the '*' on the second call, it will flatten the args, and 3 
arguments are passed to the function.

-- 
Amaury
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to