Questions about no more nested imports

Dave LeBlanc whisper at oz.net
Mon Mar 12 00:27:00 CET 2001


Ok, read the PEP (more or less again). It's not all that clear, but
does answer my original questions.

Could someone please clarify the scoping wrt to classes? I would
expect that the following code would refer to the variable at the
class scope, but it's not clear to me if it would do so:

class foo
	bar = 1
	def fee
		print bar

Dave LeBlanc

On 11 Mar 2001 19:44:13 +0000, Michael Hudson <mwh21 at cam.ac.uk> wrote:


>Read the PEP:
>
>  http://python.sourceforge.net/peps/pep-0227.html
>
>(specifically the section "Backwards compatibility").
>
>Cheers,
>M.
>




More information about the Python-list mailing list