how to convert tuple to a "list of single values" ?

stef mientki stef.mientki at gmail.com
Sun Oct 28 17:17:11 CET 2007


thanks Duncan, Matthieu and Ed (offlist),
this is exactly what I was looking for.

cheers,
Stef

Duncan Booth wrote:
> stef mientki <stef.mientki at gmail.com> wrote:
>
>   
>> hello,
>>
>> The next piece of code bothers me:
>>
>>       ptx, pty, rectWidth, rectHeight = self._point2ClientCoord (p1, p2 )
>>       dc.SetClippingRegion ( ptx, pty, rectWidth, rectHeight )
>>
>> Because I want to write it in 1 line,
>> and without the use of intermediate variables (for which I have to 
>> invent names ;-)
>> like this:
>>
>>     dc.SetClippingRegion ( self._point2ClientCoord (p1, p2 ) )
>>     
> Try:
>    dc.SetClippingRegion ( *self._point2ClientCoord (p1, p2 ) )
>   




More information about the Python-list mailing list