<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Python scoping: understanding LEGB</title>
	<atom:link href="http://blog.mozilla.org/webdev/2011/01/31/python-scoping-understanding-legb/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.mozilla.org/webdev/2011/01/31/python-scoping-understanding-legb/</link>
	<description>Engineering the web</description>
	<lastBuildDate>Fri, 17 May 2013 21:43:21 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>By: Avazu</title>
		<link>http://blog.mozilla.org/webdev/2011/01/31/python-scoping-understanding-legb/comment-page-1/#comment-214756</link>
		<dc:creator>Avazu</dc:creator>
		<pubDate>Wed, 02 Feb 2011 17:41:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/webdev/?p=1479#comment-214756</guid>
		<description><![CDATA[Seems like param is bound to func1 and local, global param raises a SyntaxError. Even func2 is a local function of func1 it seems it doesn´t work like in OOP with inheritance, I would say 

def func1(param=None):
    def func2(param2=param):
        if not param2:
            param2 = &#039;default&#039;
        print param2
    # Just return func2.
    return func2

would be a quick fix here :-)]]></description>
		<content:encoded><![CDATA[<p>Seems like param is bound to func1 and local, global param raises a SyntaxError. Even func2 is a local function of func1 it seems it doesn´t work like in OOP with inheritance, I would say </p>
<p>def func1(param=None):<br />
    def func2(param2=param):<br />
        if not param2:<br />
            param2 = &#8216;default&#8217;<br />
        print param2<br />
    # Just return func2.<br />
    return func2</p>
<p>would be a quick fix here <img src='http://blog.mozilla.org/webdev/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fred Wenzel</title>
		<link>http://blog.mozilla.org/webdev/2011/01/31/python-scoping-understanding-legb/comment-page-1/#comment-214364</link>
		<dc:creator>Fred Wenzel</dc:creator>
		<pubDate>Tue, 01 Feb 2011 21:22:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.mozilla.org/webdev/?p=1479#comment-214364</guid>
		<description><![CDATA[You don&#039;t reach a conclusion here ;) I think I do understand why this is happening, but you might want to add a sentence or two next time resolving the issue in plain English -- that&#039;ll help people who come here when googling for this problem.]]></description>
		<content:encoded><![CDATA[<p>You don&#8217;t reach a conclusion here <img src='http://blog.mozilla.org/webdev/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  I think I do understand why this is happening, but you might want to add a sentence or two next time resolving the issue in plain English &#8212; that&#8217;ll help people who come here when googling for this problem.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
