Scope of instantiated class
Peter Hansen
peter at engcorp.com
Mon Jul 22 19:29:27 EDT 2002
Stefan Schwarzer wrote:
>
> Hello Peter
>
> Peter Hansen wrote:
> > When you create an object ("instantiate a class") you
> > must bind it to a name ("assign it to a variable"). If
>
> What about
>
> L = [1, [2, 3]]
>
> ? The object [2, 3] can be accessed but it doesn't have a name.
Yes, but as always please keep the context of the original question
in mind. Such nuances are not, in this case, relevant to the OP's
question, and I was trying to give him a simple, useful answer.
-Peter
More information about the Python-list
mailing list