<font face="georgia, serif">the idea is to make an variable assignment at the same time that the existence of that variable -- which is being returned by a function -- is made.</font><div><font face="georgia, serif"><br></font></div>



<div><font face="georgia, serif">suppose we are returning a variable from the method 'get' from the 'request' object and them making some stuff with it, but that stuff we will only do if it exists, if not, we'll just pass, instead of writing:<br>



</font><div><font face="georgia, serif"><br></font></div><div><font face="courier new, monospace">variable = self.request.get('variable')</font></div><div><font face="courier new, monospace">if variable:</font></div>



</div><div><div><span style="font-family:'courier new',monospace">   print variable</span></div></div><div><font face="georgia, serif"><br></font></div><div><font face="georgia, serif">we could write</font></div>



<div><font face="georgia, serif"><br></font></div><div><font face="courier new, monospace">if self.request.get('variable') as variable:</font></div><div><div><span style="font-family:'courier new',monospace">   print variable</span></div>



</div><div><font face="georgia, serif"><br></font></div><div><font face="georgia, serif">seems stupid (or not?), but with lots of variables to process, this pre-assignment could be very unpleasant -- especially if, as the in the example case, very little use will be made of the tested variable.</font></div>


<div><font face="georgia, serif"><br></font></div><div><font face="georgia, serif">also, the "as" expression already exists and is very pythonic. </font></div>